bin/xbps-rindex/sign.c: fix a double free in error path found by clang-analyzer.
This commit is contained in:
parent
4f6fb2ff67
commit
711f2ea7f5
@ -178,10 +178,8 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
|
|||||||
defprivkey = strdup(privkey);
|
defprivkey = strdup(privkey);
|
||||||
|
|
||||||
rsa = rsa_sign_buf(defprivkey, xml, &sig, &siglen);
|
rsa = rsa_sign_buf(defprivkey, xml, &sig, &siglen);
|
||||||
if (rsa == NULL) {
|
if (rsa == NULL)
|
||||||
free(xml);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* If the signature in repo has not changed do not generate the
|
* If the signature in repo has not changed do not generate the
|
||||||
* repodata file again.
|
* repodata file again.
|
||||||
|
Loading…
Reference in New Issue
Block a user