From 52555a78946cd91034f86eb4ad03c2d76cbef0cd Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sun, 20 Oct 2013 09:04:24 -0200 Subject: [PATCH] - Fixed possible NULL ptr dereference --- ext/phar/util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } -- 2.40.0