diff options
author | Nikita Popov <nikic@php.net> | 2013-12-30 13:46:55 +0100 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2013-12-30 13:53:12 +0100 |
commit | 3b6afb1bd63ef92f9914867f04bedeea90e21789 (patch) | |
tree | dad41e7a8218d9924355b80e7f4051c25c15d8be /ext/ftp/ftp.c | |
parent | 8e5048f9fb93846846e82c42c39f1759c97a73c2 (diff) | |
download | php-git-3b6afb1bd63ef92f9914867f04bedeea90e21789.tar.gz |
Fix leak caused by fix to bug #65667
ftp->stream is now closed in the ftp resource dtor.
Diffstat (limited to 'ext/ftp/ftp.c')
-rw-r--r-- | ext/ftp/ftp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index b82017e21f..fce9ecf841 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -178,6 +178,10 @@ ftp_close(ftpbuf_t *ftp) if (ftp->data) { data_close(ftp, ftp->data); } + if (ftp->stream && ftp->closestream) { + TSRMLS_FETCH(); + php_stream_close(ftp->stream); + } if (ftp->fd != -1) { #if HAVE_OPENSSL_EXT if (ftp->ssl_active) { |