diff options
author | Luis Machado <luisgpm@br.ibm.com> | 2012-02-25 19:54:50 +0000 |
---|---|---|
committer | Luis Machado <luisgpm@br.ibm.com> | 2012-02-25 19:54:50 +0000 |
commit | 412c89dd5313d6acdd3c99b72df79c584d991b1f (patch) | |
tree | f5d46974d75d7718944cfb3d1491b9c71dc5cb75 /gdb/gdbserver/mem-break.c | |
parent | fb6ceddedd56805fc4fd64792a0e73baa8c22a21 (diff) | |
download | gdb-412c89dd5313d6acdd3c99b72df79c584d991b1f.zip gdb-412c89dd5313d6acdd3c99b72df79c584d991b1f.tar.gz gdb-412c89dd5313d6acdd3c99b72df79c584d991b1f.tar.bz2 |
2012-02-25 Luis Machado <lgustavo@codesourcery.com>
* mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
of conditions.
Diffstat (limited to 'gdb/gdbserver/mem-break.c')
-rw-r--r-- | gdb/gdbserver/mem-break.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/gdbserver/mem-break.c b/gdb/gdbserver/mem-break.c index c9a6035..6b6b25c 100644 --- a/gdb/gdbserver/mem-break.c +++ b/gdb/gdbserver/mem-break.c @@ -726,20 +726,22 @@ void clear_gdb_breakpoint_conditions (CORE_ADDR addr) { struct breakpoint *bp = find_gdb_breakpoint_at (addr); - struct point_cond_list *cond, **cond_p; + struct point_cond_list *cond; if (bp == NULL || bp->cond_list == NULL) return; cond = bp->cond_list; - cond_p = &bp->cond_list->next; while (cond != NULL) { + struct point_cond_list *cond_next; + + cond_next = cond->next; + free (cond->cond->bytes); free (cond->cond); free (cond); - cond = *cond_p; - cond_p = &cond->next; + cond = cond_next; } bp->cond_list = NULL; |