Skip to content

Commit 86a5463

Browse files
committed
Merge branch 'PHP-5.5'
* PHP-5.5: - BFN - Fixed bug #64467 (Segmentation fault after imap_reopen failure) patch by: askalski at gmail dot com - Reclassify bug
2 parents 4113b5a + 402b3aa commit 86a5463

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ext/imap/php_imap.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,6 @@ PHP_FUNCTION(imap_reopen)
12701270
int mailbox_len;
12711271
long options = 0, retries = 0;
12721272
pils *imap_le_struct;
1273-
MAILSTREAM *imap_stream;
12741273
long flags=NIL;
12751274
long cl_flags=NIL;
12761275

@@ -1298,12 +1297,12 @@ PHP_FUNCTION(imap_reopen)
12981297
RETURN_FALSE;
12991298
}
13001299

1301-
imap_stream = mail_open(imap_le_struct->imap_stream, mailbox, flags);
1302-
if (imap_stream == NIL) {
1300+
imap_le_struct->imap_stream = mail_open(imap_le_struct->imap_stream, mailbox, flags);
1301+
if (imap_le_struct->imap_stream == NIL) {
1302+
zend_list_delete(Z_RESVAL_P(streamind));
13031303
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't re-open stream");
13041304
RETURN_FALSE;
13051305
}
1306-
imap_le_struct->imap_stream = imap_stream;
13071306
RETURN_TRUE;
13081307
}
13091308
/* }}} */

0 commit comments

Comments
 (0)