Avoid leaking memory on legacy header interface emulation
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 20 May 2008 08:56:47 +0000 (11:56 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 21 May 2008 09:04:50 +0000 (12:04 +0300)
lib/header.c

index a3ebfc8..6b0d288 100644 (file)
@@ -74,6 +74,8 @@ static const int typeSizes[16] =  {
        *type = td.type; \
     if (p) \
        *p = td.data; \
+    else \
+       rpmtdFreeData(&td); \
     if (c) \
        *c = td.count