From: Joel Rosdahl Date: Mon, 1 Nov 2010 20:48:41 +0000 (+0100) Subject: Properly close fd in manifest_get if gzdopen fails X-Git-Tag: v3.1.1~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aedcfc5cc7ff1e6416d94b9109da6dc593cdd8ba;p=thirdparty%2Fccache.git Properly close fd in manifest_get if gzdopen fails --- diff --git a/manifest.c b/manifest.c index bb809ba57..6228c60a8 100644 --- a/manifest.c +++ b/manifest.c @@ -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; }