diff options
author | Felipe Pena <felipensp@gmail.com> | 2013-10-20 09:04:24 -0200 |
---|---|---|
committer | Felipe Pena <felipensp@gmail.com> | 2013-10-20 09:04:24 -0200 |
commit | 52555a78946cd91034f86eb4ad03c2d76cbef0cd (patch) | |
tree | 8cabd4a3704618fbf6b9f0a354e151771c9ea189 /ext/phar | |
parent | b6feabc8c64377f621448a65564bdf33d0de6866 (diff) | |
download | php-git-52555a78946cd91034f86eb4ad03c2d76cbef0cd.tar.gz |
- Fixed possible NULL ptr dereference
Diffstat (limited to 'ext/phar')
-rw-r--r-- | ext/phar/util.c | 6 |
1 files 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; } |