Skip to content

Commit 22691f9

Browse files
committed
Use different method to suppress "false" memory leak reports
1 parent 4d34156 commit 22691f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4129,9 +4129,6 @@ static int accel_finish_startup(void)
41294129
zend_bool old_reset_signals = SIGG(reset);
41304130
#endif
41314131

4132-
/* Cleanup heap, to avoid memory leak reports */
4133-
shutdown_memory_manager(1, 0);
4134-
41354132
if (UNEXPECTED(file_cache_only)) {
41364133
zend_accel_error(ACCEL_LOG_WARNING, "Preloading doesn't work in \"file_cache_only\" mode");
41374134
return SUCCESS;
@@ -4171,6 +4168,7 @@ static int accel_finish_startup(void)
41714168
EG(error_reporting) = orig_error_reporting;
41724169

41734170
if (rc == SUCCESS) {
4171+
zend_bool orig_report_memleaks;
41744172

41754173
/* don't send headers */
41764174
SG(headers_sent) = 1;
@@ -4192,7 +4190,10 @@ static int accel_finish_startup(void)
41924190
ret = FAILURE;
41934191
}
41944192

4193+
orig_report_memleaks = PG(report_memleaks);
4194+
PG(report_memleaks) = 0;
41954195
php_request_shutdown(NULL);
4196+
PG(report_memleaks) = orig_report_memleaks;
41964197
} else {
41974198
ret = FAILURE;
41984199
}

0 commit comments

Comments
 (0)