]> granicus.if.org Git - php/commitdiff
fix leak
authorAnatol Belski <ab@php.net>
Sun, 28 Aug 2016 16:08:06 +0000 (18:08 +0200)
committerAnatol Belski <ab@php.net>
Sun, 28 Aug 2016 17:42:41 +0000 (19:42 +0200)
ext/standard/link_win32.c

index 1bc5aa9d3df62dc23440c1aa672601539e54052f..7d43162a05dc1c12b15bdf569592f1cf68af9533 100644 (file)
@@ -157,6 +157,7 @@ PHP_FUNCTION(symlink)
                RETURN_FALSE;
        }
        if ((attr = GetFileAttributesW(dstw)) == INVALID_FILE_ATTRIBUTES) {
+               free(dstw);
                php_error_docref(NULL, E_WARNING, "Could not fetch file information(error %d)", GetLastError());
                RETURN_FALSE;
        }