aboutsummaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/debug.c b/debug.c
index 1ff43bd6..32b308af 100644
--- a/debug.c
+++ b/debug.c
@@ -5448,6 +5448,7 @@ do_eval(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
int ecount = 0, pcount = 0;
int ret;
int save_flags = do_flags;
+ SRCFILE *the_source;
if (prog_running) {
this_frame = find_frame(0);
@@ -5458,7 +5459,7 @@ do_eval(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
ctxt = new_context();
ctxt->install_func = append_symbol; /* keep track of newly installed globals */
push_context(ctxt);
- (void) add_srcfile(SRC_CMDLINE, arg->a_string, srcfiles, NULL, NULL);
+ the_source = add_srcfile(SRC_CMDLINE, arg->a_string, srcfiles, NULL, NULL);
do_flags = false;
ret = parse_program(&code);
do_flags = save_flags;
@@ -5575,6 +5576,8 @@ do_eval(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
* destroy_symbol(f); // destroy "@eval"
*/
+ free_srcfile(the_source);
+
return false;
}