summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2007-01-03 20:04:57 +0000
committerNuno Lopes <nlopess@php.net>2007-01-03 20:04:57 +0000
commitcfaf561b6d230ac6d6b981f58bb4dd39b6d19c62 (patch)
tree298467bb8414a8dd3b3d2346c2d4c4d836eca27c
parentb419742b4422793833120ce11a2106dcb6ece7c2 (diff)
downloadphp-git-cfaf561b6d230ac6d6b981f58bb4dd39b6d19c62.tar.gz
merge Tony's patch to fix memleak
-rw-r--r--ext/ftp/ftp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index 998db3f74f..367eb3adf5 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -1503,6 +1503,8 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
/* some servers don't open a ftp-data connection if the directory is empty */
if (ftp->resp == 226) {
+ ftp->data = data_close(ftp, data);
+ php_stream_close(tmpstream);
return ecalloc(1, sizeof(char**));
}