summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-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 dfb2c92f9e..327dfa4eb8 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -1015,8 +1015,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;
}