summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_list.c')
-rw-r--r--sapi/phpdbg/phpdbg_list.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c
index 3556156c0b..901fd0bb1c 100644
--- a/sapi/phpdbg/phpdbg_list.c
+++ b/sapi/phpdbg/phpdbg_list.c
@@ -294,6 +294,10 @@ zend_op_array *phpdbg_init_compile_file(zend_file_handle *file, int type) {
zend_string_release(file->opened_path);
file->opened_path = zend_string_init(filename, strlen(filename), 0);
} else {
+ if (file->free_filename) {
+ efree((char *) file->filename);
+ }
+ file->free_filename = 0;
file->filename = filename;
}
}