forked from Imagelibrary/binutils-gdb
gdb/
* breakpoint.c (bpstat_copy): Call RELEASE_VALUE on the new OLD_VAL. gdb/testsuite/ * gdb.base/value-double-free.exp, gdb.base/value-double-free.c: New.
This commit is contained in:
@@ -1996,7 +1996,10 @@ bpstat_copy (bpstat bs)
|
||||
if (bs->commands != NULL)
|
||||
tmp->commands = copy_command_lines (bs->commands);
|
||||
if (bs->old_val != NULL)
|
||||
tmp->old_val = value_copy (bs->old_val);
|
||||
{
|
||||
tmp->old_val = value_copy (bs->old_val);
|
||||
release_value (tmp->old_val);
|
||||
}
|
||||
|
||||
if (p == NULL)
|
||||
/* This is the first thing in the chain. */
|
||||
|
||||
Reference in New Issue
Block a user