--- embedaddon/php/ext/imap/php_imap.c 2013/07/22 01:31:52 1.1.1.3 +++ embedaddon/php/ext/imap/php_imap.c 2013/10/14 08:02:21 1.1.1.4 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c,v 1.1.1.3 2013/07/22 01:31:52 misho Exp $ */ +/* $Id: php_imap.c,v 1.1.1.4 2013/10/14 08:02:21 misho Exp $ */ #define IMAP41 @@ -1270,7 +1270,6 @@ PHP_FUNCTION(imap_reopen) int mailbox_len; long options = 0, retries = 0; pils *imap_le_struct; - MAILSTREAM *imap_stream; long flags=NIL; long cl_flags=NIL; @@ -1298,12 +1297,12 @@ PHP_FUNCTION(imap_reopen) RETURN_FALSE; } - imap_stream = mail_open(imap_le_struct->imap_stream, mailbox, flags); - if (imap_stream == NIL) { + imap_le_struct->imap_stream = mail_open(imap_le_struct->imap_stream, mailbox, flags); + if (imap_le_struct->imap_stream == NIL) { + zend_list_delete(Z_RESVAL_P(streamind)); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't re-open stream"); RETURN_FALSE; } - imap_le_struct->imap_stream = imap_stream; RETURN_TRUE; } /* }}} */