diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-16 10:06:56 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-16 10:06:56 +0300 |
commit | 9ebe81639ab6f5449ad88818fdd111c68245a101 (patch) | |
tree | deb7c117553b104a48be8f3bb1b65f4da12b73d1 /lib/formats.c | |
parent | 3ffbbeba1977caec65a826e408a433dddb7d2fbd (diff) | |
download | rpm-9ebe81639ab6f5449ad88818fdd111c68245a101.tar.gz rpm-9ebe81639ab6f5449ad88818fdd111c68245a101.tar.bz2 rpm-9ebe81639ab6f5449ad88818fdd111c68245a101.zip |
Plug a memory leak in armorFormat()
Diffstat (limited to 'lib/formats.c')
-rw-r--r-- | lib/formats.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/formats.c b/lib/formats.c index f728d626c..a4f8717f4 100644 --- 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; } /** |