Skip to content

Commit 2d737a1

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
2 parents ad48464 + 88ffe05 commit 2d737a1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ PHP NEWS
1010
. Fixed bug #69044 (discrepency between time and microtime). (krakjoe)
1111
. Updated timelib to 2018.02. (Derick)
1212

13+
- FTP:
14+
. Fixed bug #78039 (FTP with SSL memory leak). (Nikita)
15+
1316
- Libxml:
1417
. Fixed bug #78279 (libxml_disable_entity_loader settings is shared between
1518
requests (cgi-fcgi)). (Nikita)

ext/ftp/ftp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,10 @@ ftp_login(ftpbuf_t *ftp, const char *user, const size_t user_len, const char *pa
287287
SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_BOTH);
288288

289289
ftp->ssl_handle = SSL_new(ctx);
290+
SSL_CTX_free(ctx);
291+
290292
if (ftp->ssl_handle == NULL) {
291293
php_error_docref(NULL, E_WARNING, "failed to create the SSL handle");
292-
SSL_CTX_free(ctx);
293294
return 0;
294295
}
295296

0 commit comments

Comments
 (0)