From: Dan Kalowsky Date: Fri, 26 Jul 2002 16:59:11 +0000 (+0000) Subject: Minor memory fix suggested by Zeev X-Git-Tag: dev~147 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05f388199528ca218458f86c4aa393b6f8eab66e;p=php Minor memory fix suggested by Zeev --- diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index c75f58934b..0b8a357bc3 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -1131,12 +1131,8 @@ PHP_FUNCTION(imap_get_quotaroot) RETURN_FALSE; } - if (array_init(return_value) == FAILURE) { - php_error(E_WARNING, "%s(): Unable to allocate array memory", get_active_function_name(TSRMLS_C)); - RETURN_FALSE; - } - - add_next_index_zval(return_value, IMAPG(quotaroot_return)); + *return_value = *IMAPG(quotaroot_return); + FREE_ZVAL(IMAPG(quotaroot_return)); } /* }}} */