summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-07-15 15:19:43 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-07-15 15:20:15 +0200
commit2d737a1e4be482680f976f594c8b9aca374d6183 (patch)
treec3aa204beafac7ff96c3828a47b1ec3c6ef7c05b
parentad48464ec2ef6c9b4026129dd1adc413fa4fe3c7 (diff)
parent88ffe0579726f7ba1985c9223e6005c581032757 (diff)
downloadphp-git-2d737a1e4be482680f976f594c8b9aca374d6183.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
-rw-r--r--NEWS3
-rw-r--r--ext/ftp/ftp.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 3fcacbb17c..b894cc5b62 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,9 @@ PHP NEWS
. Fixed bug #69044 (discrepency between time and microtime). (krakjoe)
. Updated timelib to 2018.02. (Derick)
+- FTP:
+ . Fixed bug #78039 (FTP with SSL memory leak). (Nikita)
+
- Libxml:
. Fixed bug #78279 (libxml_disable_entity_loader settings is shared between
requests (cgi-fcgi)). (Nikita)
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index c196318552..27def54672 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -287,9 +287,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;
}