]> granicus.if.org Git - php/commitdiff
Minor memory fix suggested by Zeev
authorDan Kalowsky <kalowsky@php.net>
Fri, 26 Jul 2002 16:59:11 +0000 (16:59 +0000)
committerDan Kalowsky <kalowsky@php.net>
Fri, 26 Jul 2002 16:59:11 +0000 (16:59 +0000)
ext/imap/php_imap.c

index c75f58934bfda2be3a33d3975ea57cd6533afdae..0b8a357bc30e1b1edf3253cd3936c042a5d4d803 100644 (file)
@@ -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));
 }
 /* }}} */