summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-12-17 12:37:01 +0200
committerPanu Matilainen <pmatilai@redhat.com>2007-12-17 12:37:01 +0200
commit834a79e6158d9950f37cf66922875f2a10af4d21 (patch)
tree9e0f6767b4029175f76943c8a2e7784693aa5f5d /rpmio
parentbef37587d3a0eb9a59661bd02c5e8b46a6c24e7a (diff)
downloadlibrpm-tizen-834a79e6158d9950f37cf66922875f2a10af4d21.tar.gz
librpm-tizen-834a79e6158d9950f37cf66922875f2a10af4d21.tar.bz2
librpm-tizen-834a79e6158d9950f37cf66922875f2a10af4d21.zip
Use constfree for cleaning up pgp digest contents
- the contents are exposed within rpm (although not public interfaces) but pgpCleanDig() should be used to free the struct - pgpDig and pgpDigParams need encapsulation + api...
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/rpmpgp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c
index 48fdb8d18..fb3216366 100644
--- a/rpmio/rpmpgp.c
+++ b/rpmio/rpmpgp.c
@@ -1046,14 +1046,14 @@ void pgpCleanDig(pgpDig dig)
{
if (dig != NULL) {
int i;
- dig->signature.userid = _free(dig->signature.userid);
- dig->pubkey.userid = _free(dig->pubkey.userid);
- dig->signature.hash = _free(dig->signature.hash);
- dig->pubkey.hash = _free(dig->pubkey.hash);
+ dig->signature.userid = _constfree(dig->signature.userid);
+ dig->pubkey.userid = _constfree(dig->pubkey.userid);
+ dig->signature.hash = _constfree(dig->signature.hash);
+ dig->pubkey.hash = _constfree(dig->pubkey.hash);
/* FIX: double indirection */
for (i = 0; i < 4; i++) {
- dig->signature.params[i] = _free(dig->signature.params[i]);
- dig->pubkey.params[i] = _free(dig->pubkey.params[i]);
+ dig->signature.params[i] = _constfree(dig->signature.params[i]);
+ dig->pubkey.params[i] = _constfree(dig->pubkey.params[i]);
}
memset(&dig->signature, 0, sizeof(dig->signature));