aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/mi/mi-cmd-var.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 51d4db5..3f50bca 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-28 Vladimir Prus <vladimir@codesourcery.com>
+
+ * mi/mi-cmd-var.c (mi_cmd_var_create): Fix cleanup
+ handlers. Free expression.
+
2006-11-28 Ulrich Weigand <uweigand@de.ibm.com>
* config/tm-linux.h (REALTIME_LO, REALTIME_HI): Do not define.
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index ab83525..92351c4 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -66,9 +66,10 @@ mi_cmd_var_create (char *command, char **argv, int argc)
old_cleanups = make_cleanup (free_current_contents, &name);
frame = xstrdup (argv[1]);
- old_cleanups = make_cleanup (xfree, frame);
+ make_cleanup (xfree, frame);
expr = xstrdup (argv[2]);
+ make_cleanup (xfree, expr);
if (strcmp (name, "-") == 0)
{