aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtk.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbtk.c')
-rw-r--r--gdb/gdbtk.c5
1 files changed, 4 insertions, 1 deletions
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));
}