Skip to content

Commit 12a0918

Browse files
committed
Fix bug 76618
Apply patch which was attached to the bug in July 2018
1 parent d4bf079 commit 12a0918

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ PHP NEWS
44

55
- IMAP:
66
. Fixed bug #64076 (imap_sort() does not return FALSE on failure). (cmb)
7+
. Fixed bug #76618 (segfault on imap_reopen). (girgias)
78
. Fixed bug #80239 (imap_rfc822_write_address() leaks memory). (cmb)
89
. Fixed minor regression caused by fixing bug #80220. (cmb)
910
. Fixed bug #80242 (imap_mail_compose() segfaults for multipart with rfc822).

ext/imap/php_imap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ PHP_FUNCTION(imap_reopen)
13151315

13161316
imap_le_struct->imap_stream = mail_open(imap_le_struct->imap_stream, ZSTR_VAL(mailbox), flags);
13171317
if (imap_le_struct->imap_stream == NIL) {
1318-
zend_list_delete(Z_RES_P(streamind));
1318+
zend_list_close(Z_RES_P(streamind));
13191319
php_error_docref(NULL, E_WARNING, "Couldn't re-open stream");
13201320
RETURN_FALSE;
13211321
}

0 commit comments

Comments
 (0)