projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83e894d
)
Plug a dumb memleak that has crept into rpmReadPackageFile()
author
Panu Matilainen
<pmatilai@redhat.com>
Wed, 2 Jul 2008 15:49:05 +0000
(18:49 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Wed, 2 Jul 2008 15:49:05 +0000
(18:49 +0300)
- jumps to exit from very early on, make sure sigtd is reset early so
calling rpmtdFreeData() is safe
lib/package.c
patch
|
blob
|
history
diff --git
a/lib/package.c
b/lib/package.c
index
16dc12b
..
9d95da0
100644
(file)
--- a/
lib/package.c
+++ b/
lib/package.c
@@
-596,6
+596,7
@@
rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
if (hdrp) *hdrp = NULL;
+ rpmtdReset(&sigtd);
l = rpmLeadNew();
if ((rc = rpmLeadRead(fd, l)) == RPMRC_OK) {
@@
-845,6
+846,7
@@
exit:
/* Bump reference count for return. */
*hdrp = headerLink(h);
}
+ rpmtdFreeData(&sigtd);
h = headerFree(h);
pgpFreeDig(dig);
sigh = rpmFreeSignature(sigh);