From: Anatol Belski Date: Fri, 12 Sep 2014 20:18:06 +0000 (+0200) Subject: fix possible nullptr derefrence X-Git-Tag: PRE_NATIVE_TLS_MERGE~150^2~18^2~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ac5a36a2f37b167d0114e6e2720086ba5c6c567;p=php fix possible nullptr derefrence --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index b45db8a9b4..f37ae5614e 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4861,9 +4861,11 @@ static int user_shutdown_function_call(zval *zv TSRMLS_DC) /* {{{ */ zend_string *function_name; if (!zend_is_callable(&shutdown_function_entry->arguments[0], 0, &function_name TSRMLS_CC)) { - php_error(E_WARNING, "(Registered shutdown functions) Unable to call %s() - function does not exist", function_name->val); if (function_name) { + php_error(E_WARNING, "(Registered shutdown functions) Unable to call %s() - function does not exist", function_name->val); zend_string_release(function_name); + } else { + php_error(E_WARNING, "(Registered shutdown functions) Unable to call - function does not exist"); } return 0; }