Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index ebacc88..75c2487 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -4120,14 +4120,14 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *
if (!php_stream_mkdir(fullpath, entry->flags & PHAR_ENT_PERM_MASK, PHP_STREAM_MKDIR_RECURSIVE, NULL)) {
spprintf(error, 4096, "Cannot extract \"%s\", could not create directory \"%s\"", entry->filename, fullpath);
efree(fullpath);
- free(new_state.cwd);
+ efree(new_state.cwd);
return FAILURE;
}
} else {
if (!php_stream_mkdir(fullpath, 0777, PHP_STREAM_MKDIR_RECURSIVE, NULL)) {
spprintf(error, 4096, "Cannot extract \"%s\", could not create directory \"%s\"", entry->filename, fullpath);
efree(fullpath);
- free(new_state.cwd);
+ efree(new_state.cwd);
return FAILURE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment