summaryrefslogtreecommitdiff
path: root/ext/phar
diff options
context:
space:
mode:
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;
}