Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions ext/phar/dirstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,6 @@ php_stream *phar_wrapper_open_dir(php_stream_wrapper *wrapper, const char *path,
return NULL;
}

if (error) {
efree(error);
}

if (zend_string_equals(resource->path, ZSTR_CHAR('/'))) {
/* root directory requested */
php_url_free(resource);
Expand Down
11 changes: 0 additions & 11 deletions ext/phar/phar_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -1655,9 +1655,6 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */
return ZEND_HASH_APPLY_STOP;

} else {
if (error) {
efree(error);
}
/* convert to PHAR_UFP */
if (data->internal_file->fp_type == PHAR_MOD) {
php_stream_close(data->internal_file->fp);
Expand Down Expand Up @@ -3603,10 +3600,6 @@ static void phar_add_file(phar_archive_data **pphar, zend_string *file_name, con
}
goto finish;
} else {
if (error) {
efree(error);
}

if (!data->internal_file->is_dir) {
size_t contents_len = 0;
if (content) {
Expand Down Expand Up @@ -3683,10 +3676,6 @@ static void phar_mkdir(phar_archive_data **pphar, zend_string *dir_name)

return;
} else {
if (error) {
efree(error);
}

/* check for copy on write */
if (data->phar != *pphar) {
*pphar = data->phar;
Expand Down
6 changes: 0 additions & 6 deletions ext/phar/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,6 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, const cha
php_url_free(resource);
return NULL;
}
if (error) {
efree(error);
}
fpf = php_stream_alloc(&phar_ops, idata, NULL, mode);
php_url_free(resource);
efree(internal_file);
Expand Down Expand Up @@ -706,9 +703,6 @@ static int phar_wrapper_unlink(php_stream_wrapper *wrapper, const char *url, int
php_url_free(resource);
return 0;
}
if (error) {
efree(error);
}
if (idata->internal_file->fp_refcount > 1) {
/* more than just our fp resource is open for this file */
php_stream_wrapper_log_error(wrapper, options, "phar error: \"%s\" in phar \"%s\", has open file pointers, cannot unlink", internal_file, ZSTR_VAL(resource->host));
Expand Down
Loading