From: twosee Date: Wed, 21 Oct 2020 05:17:16 +0000 (+0800) Subject: Fix invalid memory read on libpath X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5998b2a3a65042dc7fc4f70945dd72e4e258500f;p=php Fix invalid memory read on libpath Introduced in 3e33e1e86d15e262cd9e0224a9604e252f5d9284. Closes GH-6362. --- diff --git a/main/php_ini.c b/main/php_ini.c index 53c08ae3c4..52e3a20ebf 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -374,13 +374,13 @@ static void php_load_zend_extension_cb(void *arg) efree(orig_libpath); efree(err1); - efree(libpath); } #ifdef PHP_WIN32 if (!php_win32_image_compatible(handle, &err1)) { php_error(E_CORE_WARNING, err1); efree(err1); + efree(libpath); DL_UNLOAD(handle); return; }