]> granicus.if.org Git - php/commitdiff
fix leaks
authorAntony Dovgal <tony2001@php.net>
Sun, 3 Dec 2006 13:58:54 +0000 (13:58 +0000)
committerAntony Dovgal <tony2001@php.net>
Sun, 3 Dec 2006 13:58:54 +0000 (13:58 +0000)
ext/ftp/ftp.c

index 60a6b78da2e0e2072263d954837531be03649709..8fb9082b183076ff6e55636c474c6bde7a0b13b6 100644 (file)
@@ -1620,6 +1620,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**));
        }