diff --git a/bin/xbps-rindex/sign.c b/bin/xbps-rindex/sign.c index 6e678387..288f1f91 100644 --- a/bin/xbps-rindex/sign.c +++ b/bin/xbps-rindex/sign.c @@ -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.