xbps-rindex: fix a double close (CID #98694).

This commit is contained in:
Juan RP 2015-07-26 07:59:16 +02:00
parent 8d20760fee
commit 97c8eb0c36

View File

@ -281,6 +281,7 @@ sign_pkg(struct xbps_handle *xhp, const char *binpkg, const char *privkey, bool
goto out; goto out;
} }
close(binpkg_fd); close(binpkg_fd);
binpkg_fd = -1;
rsa = load_rsa_key(privkey); rsa = load_rsa_key(privkey);
if (!rsa_sign_buf(rsa, buf, st.st_size, &sig, &siglen)) { if (!rsa_sign_buf(rsa, buf, st.st_size, &sig, &siglen)) {