summaryrefslogtreecommitdiff
path: root/ext/phar
diff options
context:
space:
mode:
authorFelipe Pena <felipensp@gmail.com>2013-10-20 09:04:27 -0200
committerFelipe Pena <felipensp@gmail.com>2013-10-20 09:04:27 -0200
commit5b0560efc3e803cdb59d161cb3cd660e388b211f (patch)
tree8f43f45ce801611a5788f1c9e19152f2eb145814 /ext/phar
parentdf31eb8fdcd3f1d45a799c397c8ca8573a76551b (diff)
parent52555a78946cd91034f86eb4ad03c2d76cbef0cd (diff)
downloadphp-git-5b0560efc3e803cdb59d161cb3cd660e388b211f.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: - Fixed possible NULL ptr dereference
Diffstat (limited to 'ext/phar')
-rw-r--r--ext/phar/util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/phar/util.c b/ext/phar/util.c
index dc4508f91c..97b70a9d95 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -1273,8 +1273,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;
}