Fix memleak from i18n strings if retrieved with HEADERGET_ALLOC
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 19 Jan 2009 12:21:45 +0000 (14:21 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 19 Jan 2009 12:21:45 +0000 (14:21 +0200)
lib/header.c

index 0d914de..0b6ed3e 100644 (file)
@@ -1358,6 +1358,7 @@ static int copyI18NEntry(Header h, indexEntry entry, rpmtd td,
 exit:
     if (flags & HEADERGET_ALLOC) {
        td->data = xstrdup(td->data);
+       td->flags |= RPMTD_ALLOCED;
     }
 
     return 1;