Skip to content

Commit

Permalink
Merge branch 'PHP-7.2'
Browse files Browse the repository at this point in the history
* PHP-7.2:
  NEWS
  NEWS
  NEWS
  fix bug #75540 Segfault with libzip 1.3.1
  • Loading branch information
remicollet committed Nov 20, 2017
2 parents 23b61f7 + 045e0fc commit 15a0de4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/zip/php_zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,10 @@ static ZIPARCHIVE_METHOD(close)

if ((err = zip_close(intern))) {
php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern));
#if LIBZIP_VERSION_MAJOR < 1 || (LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR < 3) || (LIBZIP_VERSION_MAJOR == 1 && LIBZIP_VERSION_MINOR == 3 && LIBZIP_VERSION_MICRO < 1)
/* Fix memory leak in libzip < 1.3.1 */
zip_discard(intern);
#endif
}

efree(ze_obj->filename);
Expand Down

0 comments on commit 15a0de4

Please sign in to comment.