]> granicus.if.org Git - php/commitdiff
Fix memory leak when compiling files in phpdbg
authorBob Weinand <bobwei9@hotmail.com>
Fri, 14 Oct 2016 10:24:28 +0000 (12:24 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Fri, 14 Oct 2016 10:24:28 +0000 (12:24 +0200)
sapi/phpdbg/phpdbg_list.c

index 87594614e1a386c8238f50db116eb76878874e5e..b0bb157f08511bb735ae7a9d7ea9ced6d5aef868 100644 (file)
@@ -312,8 +312,8 @@ zend_op_array *phpdbg_init_compile_file(zend_file_handle *file, int type) {
                        if (file->free_filename) {
                                efree((char *) file->filename);
                        }
-                       file->free_filename = 1;
-                       file->filename = estrdup(filename);
+                       file->free_filename = 0;
+                       file->filename = filename;
                }
        }