diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-25 12:09:47 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-15 15:19:31 +0200 |
commit | 88ffe0579726f7ba1985c9223e6005c581032757 (patch) | |
tree | d7c39acaf2cd6ec2fe984c644c644b424406af62 | |
parent | eab0079c902a9a52773c6bb63b57555dee45b3ab (diff) | |
download | php-git-88ffe0579726f7ba1985c9223e6005c581032757.tar.gz |
Fix bug #77124
This is a backport of 6fcae63f614d1ed4aaeaff7b13a7a4627b1f1312
to PHP 7.2.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | ext/ftp/ftp.c | 3 |
2 files changed, 5 insertions, 1 deletions
@@ -6,6 +6,9 @@ PHP NEWS . Fixed bug #78183 (finfo_file shows wrong mime-type for .tga file). (Joshua Westerheide) +- FTP: + . Fixed bug #77124 (FTP with SSL memory leak). (Nikita) + - PDO_Sqlite: . Fixed bug #78192 (SegFault when reuse statement after schema has changed). (Vincent Quatrevieux) diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 8f9f737678..28760349df 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -289,9 +289,10 @@ ftp_login(ftpbuf_t *ftp, const char *user, const size_t user_len, const char *pa SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_BOTH); ftp->ssl_handle = SSL_new(ctx); + SSL_CTX_free(ctx); + if (ftp->ssl_handle == NULL) { php_error_docref(NULL, E_WARNING, "failed to create the SSL handle"); - SSL_CTX_free(ctx); return 0; } |