]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Properly close fd in manifest_get if gzdopen fails
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 1 Nov 2010 20:48:41 +0000 (21:48 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 1 Nov 2010 20:58:53 +0000 (21:58 +0100)
manifest.c

index bb809ba5736d292cdad9a5825708169b4970b4e8..6228c60a82c54fc6574a31d7718ebea8b83e57de 100644 (file)
@@ -536,6 +536,7 @@ manifest_get(const char *manifest_path)
        }
        f = gzdopen(fd, "rb");
        if (!f) {
+               close(fd);
                cc_log("Failed to gzdopen manifest file");
                goto out;
        }