com php-src: 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.: ext/ftp/php_ftp.c
| From: | Dmitry Stogov | Date: | Tue, 13 May 2014 08:47:34 +0000 |
| Subject: | com php-src: 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.: ext/ftp/php_ftp.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78308@lists.php.net to get a copy of this message | ||
Commit: 7b1cb4922f42417e5cdb954c54570f9a575d7839
Author: Dmitry Stogov <dmitry@zend.com> Tue, 13 May 2014 12:47:34 +0400
Parents: 376ab3b7873ca04142185d8c08dbb4c4be152474
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7b1cb4922f42417e5cdb954c54570f9a575d7839
Log:
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.
Changed paths:
M ext/ftp/php_ftp.c
Diff:
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index 2badf29..46e336d 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);
}
/* }}} */