From: Felipe Pena Date: Sun, 20 Oct 2013 11:04:24 +0000 (-0200) Subject: - Fixed possible NULL ptr dereference X-Git-Tag: php-5.5.6RC1~5^2~20^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52555a78946cd91034f86eb4ad03c2d76cbef0cd;p=php - Fixed possible NULL ptr dereference --- diff --git a/ext/phar/util.c b/ext/phar/util.c index 898d8bd4b2..227bd15dc7 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -1262,8 +1262,10 @@ alias_success: spprintf(error, 0, "alias \"%s\" is already used for archive \"%s\" cannot be overloaded with \"%s\"", alias, (*fd_ptr)->fname, fname); } if (SUCCESS == phar_free_alias(*fd_ptr, alias, alias_len TSRMLS_CC)) { - efree(*error); - *error = NULL; + if (error) { + efree(*error); + *error = NULL; + } } return FAILURE; }