aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>1996-11-19 16:38:48 +0000
committerTom Tromey <tromey@redhat.com>1996-11-19 16:38:48 +0000
commitbd45f82f415de7b2b37eea385d0c215e8e5abd84 (patch)
treecc291e46317eca945f3593dad1495e343159db23 /gdb
parenta5a6e3bd0a4e85c405a31aba675b3a657f299590 (diff)
downloadgdb-bd45f82f415de7b2b37eea385d0c215e8e5abd84.zip
gdb-bd45f82f415de7b2b37eea385d0c215e8e5abd84.tar.gz
gdb-bd45f82f415de7b2b37eea385d0c215e8e5abd84.tar.bz2
* gdbtk.c (gdbtk_readline): Fix memory leak.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/gdbtk.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 27e172b..5cd75e7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,4 +1,8 @@
start-sanitize-gdbtk
+Tue Nov 19 09:26:14 1996 Tom Tromey <tromey@cygnus.com>
+
+ * gdbtk.c (gdbtk_readline): Fix memory leak.
+
Mon Nov 18 23:43:05 1996 Tom Tromey <tromey@cygnus.com>
Fixes for Tcl 7.6 / Tk 4.2:
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c
index d90dfc0..6d569f5 100644
--- a/gdb/gdbtk.c
+++ b/gdb/gdbtk.c
@@ -253,11 +253,14 @@ gdbtk_readline (prompt)
{
char *merge[2];
char *command;
+ int result;
merge[0] = "gdbtk_tcl_readline";
merge[1] = prompt;
command = Tcl_Merge (2, merge);
- if (Tcl_Eval (interp, command) == TCL_OK)
+ result = Tcl_Eval (interp, command);
+ free (command);
+ if (result == TCL_OK)
{
return (strdup (interp -> result));
}