From 51b57b6b26e4c4780d5f6f7ffacca721e75ff039 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Tue, 28 Nov 2006 19:40:27 +0000 Subject: [PATCH] 2006-11-28 Vladimir Prus * mi/mi-cmd-var.c (mi_cmd_var_create): Fix cleanup handlers. Free expression. --- gdb/ChangeLog | 5 +++++ gdb/mi/mi-cmd-var.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 51d4db572be..3f50bca4278 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-11-28 Vladimir Prus + + * mi/mi-cmd-var.c (mi_cmd_var_create): Fix cleanup + handlers. Free expression. + 2006-11-28 Ulrich Weigand * 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 ab835258afc..92351c46921 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) { -- 2.30.2