bin/xbps-rindex/sign.c: fix a double free in error path found by clang-analyzer.

This commit is contained in:
Juan RP 2013-12-11 12:39:15 +01:00
parent 4f6fb2ff67
commit 711f2ea7f5

View File

@ -178,10 +178,8 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
defprivkey = strdup(privkey);
rsa = rsa_sign_buf(defprivkey, xml, &sig, &siglen);
if (rsa == NULL) {
free(xml);
if (rsa == NULL)
goto out;
}
/*
* If the signature in repo has not changed do not generate the
* repodata file again.