Revert "xbps-rindex: [sign] free pubkey data obj after externalizing index-meta."
This reverts commit 11e04685ef61116e3e1fe0552d8abfdc4ec5b5b4.
This commit is contained in:
parent
06b0f86ef4
commit
9fe6b363d6
@ -283,14 +283,14 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
|
|||||||
xbps_dictionary_set_uint16(meta, "public-key-size", pubkeysize);
|
xbps_dictionary_set_uint16(meta, "public-key-size", pubkeysize);
|
||||||
xbps_dictionary_set_cstring_nocopy(meta, "signature-by", signedby);
|
xbps_dictionary_set_cstring_nocopy(meta, "signature-by", signedby);
|
||||||
xbps_dictionary_set_cstring_nocopy(meta, "signature-type", "rsa");
|
xbps_dictionary_set_cstring_nocopy(meta, "signature-type", "rsa");
|
||||||
if (!repodata_flush(xhp, repodir, repo->idx, repo->idxfiles, meta)) {
|
|
||||||
fprintf(stderr, "failed to write repodata: %s\n", strerror(errno));
|
|
||||||
rv = -1;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
xbps_object_release(data);
|
xbps_object_release(data);
|
||||||
data = NULL;
|
data = NULL;
|
||||||
|
|
||||||
|
if (!repodata_flush(xhp, repodir, repo->idx, repo->idxfiles, meta)) {
|
||||||
|
fprintf(stderr, "failed to write repodata: %s\n", strerror(errno));
|
||||||
|
RSA_free(rsa);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
printf("Signed repository (%u package%s)\n",
|
printf("Signed repository (%u package%s)\n",
|
||||||
xbps_dictionary_count(repo->idx),
|
xbps_dictionary_count(repo->idx),
|
||||||
xbps_dictionary_count(repo->idx) == 1 ? "" : "s");
|
xbps_dictionary_count(repo->idx) == 1 ? "" : "s");
|
||||||
@ -298,8 +298,6 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
|
|||||||
out:
|
out:
|
||||||
index_unlock(il);
|
index_unlock(il);
|
||||||
|
|
||||||
if (data)
|
|
||||||
xbps_object_release(data);
|
|
||||||
if (rsa) {
|
if (rsa) {
|
||||||
RSA_free(rsa);
|
RSA_free(rsa);
|
||||||
rsa = NULL;
|
rsa = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user