mirror of
https://github.com/php/php-src.git
synced 2026-04-24 00:18:23 +02:00
MFB: fix leak in oo_stream.phpt
This commit is contained in:
@@ -60,9 +60,15 @@ static size_t php_zip_ops_write(php_stream *stream, const char *buf, size_t coun
|
||||
static int php_zip_ops_close(php_stream *stream, int close_handle TSRMLS_DC)
|
||||
{
|
||||
STREAM_DATA_FROM_STREAM();
|
||||
if (close_handle && self->za) {
|
||||
zip_close(self->za);
|
||||
self->za = NULL;
|
||||
if (close_handle) {
|
||||
if (self->za) {
|
||||
zip_close(self->za);
|
||||
self->za = NULL;
|
||||
}
|
||||
if (self->zf) {
|
||||
zip_fclose(self->zf);
|
||||
self->zf = NULL;
|
||||
}
|
||||
}
|
||||
efree(self);
|
||||
stream->abstract = NULL;
|
||||
|
||||
Reference in New Issue
Block a user