From: Dmitry Stogov Date: Tue, 13 May 2014 08:47:34 +0000 (+0400) Subject: Fixed safe resource close. X-Git-Tag: POST_PHPNG_MERGE~374^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b1cb4922f42417e5cdb954c54570f9a575d7839;p=php Fixed safe resource close. It must not de deleted (just closed), because it still may be referenced from zval(s). This fixes few ext/ftp test memory failures detected with valgrind. --- diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 2badf294ea..46e336deb0 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -1360,7 +1360,7 @@ PHP_FUNCTION(ftp_close) ftp_quit(ftp); - RETURN_BOOL(zend_list_delete(Z_RES_P(z_ftp)) == SUCCESS); + RETURN_BOOL(zend_list_close(Z_RES_P(z_ftp)) == SUCCESS); } /* }}} */