From cfaf561b6d230ac6d6b981f58bb4dd39b6d19c62 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Wed, 3 Jan 2007 20:04:57 +0000 Subject: [PATCH] merge Tony's patch to fix memleak --- ext/ftp/ftp.c | 2 ++ 1 file changed, 2 insertions(+) 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**)); } -- 2.50.1