RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 13-Nov-2007 04:54:31
Branch: HEAD Handle: 2007111303543001
Modified files:
rpm CHANGES
rpm/lib rpmchecksig.c
rpm/rpmio rpmpgp.c
Log:
- jbj: fix the last memory leak with -Kvv, recheck install/query
paths.
Summary:
Revision Changes Path
1.1821 +1 -0 rpm/CHANGES
1.177 +6 -3 rpm/lib/rpmchecksig.c
2.66 +2 -6 rpm/rpmio/rpmpgp.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1820 -r1.1821 CHANGES
--- rpm/CHANGES 13 Nov 2007 01:58:46 -0000 1.1820
+++ rpm/CHANGES 13 Nov 2007 03:54:30 -0000 1.1821
@@ -1,4 +1,5 @@
5.0a1 -> 5.0a2:
+ - jbj: fix the last memory leak with -Kvv, recheck install/query paths.
- jbj: functional -Kvv *.xar header-only DSA verify.
- jbj: disable tagTypeValidate on --addsig and --delsig paths.
- jbj: remap rpmlog levels to status quo ante.
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmchecksig.c
============================================================================
$ cvs diff -u -r1.176 -r1.177 rpmchecksig.c
--- rpm/lib/rpmchecksig.c 13 Nov 2007 01:54:54 -0000 1.176
+++ rpm/lib/rpmchecksig.c 13 Nov 2007 03:54:31 -0000 1.177
@@ -1031,7 +1031,7 @@
if (sigh != NULL)
for (hi = headerInitExtension(sigh);
headerNextExtension(hi, she, 0) != 0;
- /*@-noeffect@*/ xx = pgpSetSig(rpmtsDig(ts), 0, 0, NULL, 0) /*@=noeffect@*/)
+ she->p.ptr = headerFreeData(she->p.ptr, she->t))
{
assert(she->p.ptr != NULL);
@@ -1234,9 +1234,12 @@
}
}
}
- if (hi != NULL)
- hi = headerFreeIterator(hi);
+ hi = headerFreeIterator(hi);
she->signature = 0;
+ /* XXX clear the already free'd signature data. */
+/*@-noeffect@*/
+ xx = pgpSetSig(rpmtsDig(ts), 0, 0, NULL, 0);
+/*@=noeffect@*/
res += res2;
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmpgp.c
============================================================================
$ cvs diff -u -r2.65 -r2.66 rpmpgp.c
--- rpm/rpmio/rpmpgp.c 8 Nov 2007 19:40:41 -0000 2.65
+++ rpm/rpmio/rpmpgp.c 13 Nov 2007 03:54:31 -0000 2.66
@@ -1078,8 +1078,8 @@
if (dig != NULL) {
/* Lose the header tag data. */
- if (dig->sig)
- dig->sig = _free(dig->sig);
+ /* XXX this free should be done somewhere else. */
+ dig->sig = _free(dig->sig);
/* Dump the signature/pubkey data. */
pgpCleanDig(dig);
@@ -1155,10 +1155,6 @@
uint32_t sigtag, uint32_t sigtype, const void * sig, uint32_t siglen)
{
if (dig != NULL) {
-#if 0
- if (dig->sig)
- dig->sig = _free(dig->sig);
-#endif
dig->sigtag = sigtag;
dig->sigtype = (sig ? sigtype : 0);
/*@-assignexpose -kepttrans@*/
@@ .
Received on Tue Nov 13 04:54:31 2007