Skip to content

Commit d5e2431

Browse files
committed
Fix bug 76618
Apply patch which was attached to the bug in July 2018
1 parent 85d9a1c commit d5e2431

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
@@ -1323,7 +1323,7 @@ PHP_FUNCTION(imap_reopen)
13231323

13241324
imap_le_struct->imap_stream = mail_open(imap_le_struct->imap_stream, ZSTR_VAL(mailbox), flags);
13251325
if (imap_le_struct->imap_stream == NIL) {
1326-
zend_list_delete(Z_RES_P(streamind));
1326+
zend_list_close(Z_RES_P(streamind));
13271327
php_error_docref(NULL, E_WARNING, "Couldn't re-open stream");
13281328
RETURN_FALSE;
13291329
}

0 commit comments

Comments
 (0)