php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch release-file-handle for phpdbg Bug #76801

Patch version 2018-08-28 12:55 UTC

Return to Bug #76801 | Download this patch
Patch Revisions:

Developer: cmb@php.net

 sapi/phpdbg/phpdbg_list.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c
index 865f75bc27..c024484a7e 100644
--- a/sapi/phpdbg/phpdbg_list.c
+++ b/sapi/phpdbg/phpdbg_list.c
@@ -288,6 +288,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
 	phpdbg_resolve_pending_file_break(ZSTR_VAL(ret->filename));
 
 	fake.opened_path = NULL;
+	zend_destroy_file_handle(&fake);
 	zend_file_handle_dtor(&fake);
 
 	return ret;
@@ -315,6 +316,8 @@ zend_op_array *phpdbg_init_compile_file(zend_file_handle *file, int type) {
 	}
 
 	op_array = PHPDBG_G(init_compile_file)(file, type);
+	zend_destroy_file_handle(file);
+	zend_file_handle_dtor(file);
 
 	if (op_array == NULL) {
 		return NULL;
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Oct 16 17:03:34 2021 UTC