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:
3ffbbeb
)
Plug a memory leak in armorFormat()
author
Panu Matilainen
<pmatilai@redhat.com>
Wed, 16 Apr 2008 07:06:56 +0000
(10:06 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Wed, 16 Apr 2008 07:06:56 +0000
(10:06 +0300)
lib/formats.c
patch
|
blob
|
history
diff --git
a/lib/formats.c
b/lib/formats.c
index
f728d62
..
a4f8717
100644
(file)
--- a/
lib/formats.c
+++ b/
lib/formats.c
@@
-138,6
+138,7
@@
static char * armorFormat(rpmTagType type, rpm_constdata_t data,
const char * enc;
const unsigned char * s;
unsigned char * bs;
+ char *val;
size_t ns;
int atype;
@@
-168,7
+169,9
@@
static char * armorFormat(rpmTagType type, rpm_constdata_t data,
}
/* XXX this doesn't use padding directly, assumes enough slop in retval. */
- return pgpArmorWrap(atype, s, ns);
+ val = pgpArmorWrap(atype, s, ns);
+ free(bs);
+ return val;
}
/**