summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-05-07 09:48:39 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-05-07 09:48:39 +0300
commitfc36f322e123a7421b798f12358cc701e28afbe0 (patch)
tree352fc162576694c788cef9c8b9601970d4eda3ce
parent16d0a2fa29df88689fc56ef271a2538a5ca1cba6 (diff)
downloadrpm-fc36f322e123a7421b798f12358cc701e28afbe0.tar.gz
rpm-fc36f322e123a7421b798f12358cc701e28afbe0.tar.bz2
rpm-fc36f322e123a7421b798f12358cc701e28afbe0.zip
Plug another memleak from genCpioListAndHeader()
- free fuser + fgroup info instead of NULLing, add comment on side-effects
-rw-r--r--build/files.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/build/files.c b/build/files.c
index fad6720b4..538f50d0a 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1209,8 +1209,10 @@ static void genCpioListAndHeader(FileList fl,
if (fl->buildRoot)
fi->astriplen = strlen(fl->buildRoot);
fi->striplen = 0;
- fi->fuser = NULL;
- fi->fgroup = NULL;
+ /* Make all files in the cpio header owned by root:root. */
+ /* XXX Should we? It's against what LSB states (of RPMv3)... */
+ fi->fuser = _free(fi->fuser);
+ fi->fgroup = _free(fi->fgroup);
/* Make the cpio list */
if (fi->dil != NULL) /* XXX can't happen */