From 97c8eb0c361e11b67a56d7e3b664b072adc5186d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 26 Jul 2015 07:59:16 +0200 Subject: [PATCH] xbps-rindex: fix a double close (CID #98694). --- bin/xbps-rindex/sign.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/xbps-rindex/sign.c b/bin/xbps-rindex/sign.c index 68db5a8f..72d09106 100644 --- a/bin/xbps-rindex/sign.c +++ b/bin/xbps-rindex/sign.c @@ -281,6 +281,7 @@ sign_pkg(struct xbps_handle *xhp, const char *binpkg, const char *privkey, bool goto out; } close(binpkg_fd); + binpkg_fd = -1; rsa = load_rsa_key(privkey); if (!rsa_sign_buf(rsa, buf, st.st_size, &sig, &siglen)) {