Skip to content

Commit fa1f248

Browse files
committed
fix memory leak
1 parent cf72b81 commit fa1f248

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Zend/zend_ini.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,11 @@ ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage) /*
316316
}
317317

318318
if (EG(modified_ini_directives)) {
319-
zend_restore_ini_entry_cb(ini_entry, stage TSRMLS_CC);
320-
zend_hash_del(EG(modified_ini_directives), name, name_length);
319+
if(zend_restore_ini_entry_cb(ini_entry, stage TSRMLS_CC) == 0) {
320+
zend_hash_del(EG(modified_ini_directives), name, name_length);
321+
} else {
322+
return FAILURE;
323+
}
321324
}
322325

323326
return SUCCESS;

0 commit comments

Comments
 (0)