From fad0733a64e6fe0c4931c183e5ca13631f9272d7 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sat, 31 Jan 2004 18:14:08 +0000 Subject: [PATCH] * breakpoint.c (breakpoint_re_set_one): Add missing chunk of 2004-01-27 double-free fix. --- gdb/ChangeLog | 5 +++++ gdb/breakpoint.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 720dc8071c8..3e5deadfa91 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2004-01-31 Daniel Jacobowitz + + * breakpoint.c (breakpoint_re_set_one): Add missing chunk of + 2004-01-27 double-free fix. + 2004-01-31 Mark Kettenis * sparc-tdep.c (sparc_fetch_wcookie): New function. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index a9bd979adc0..4ea0f676ff3 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -6902,7 +6902,12 @@ breakpoint_re_set_one (void *bint) { s = b->cond_string; if (b->cond) - xfree (b->cond); + { + xfree (b->cond); + /* Avoid re-freeing b->exp if an error during the call + to parse_exp_1. */ + b->cond = NULL; + } b->cond = parse_exp_1 (&s, block_for_pc (sals.sals[i].pc), 0); } -- 2.30.2