]> granicus.if.org Git - php/commitdiff
fix possible nullptr derefrence
authorAnatol Belski <ab@php.net>
Fri, 12 Sep 2014 20:18:06 +0000 (22:18 +0200)
committerAnatol Belski <ab@php.net>
Fri, 12 Sep 2014 20:18:06 +0000 (22:18 +0200)
ext/standard/basic_functions.c

index b45db8a9b492e9a3ed8b9059328f3eb7c6625a6b..f37ae5614e9567e88aa7df7af320e61bc42acc7c 100644 (file)
@@ -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;
        }