From fc36f322e123a7421b798f12358cc701e28afbe0 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 7 May 2008 09:48:39 +0300 Subject: Plug another memleak from genCpioListAndHeader() - free fuser + fgroup info instead of NULLing, add comment on side-effects --- build/files.c | 6 ++++-- 1 file 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 */ -- cgit v1.2.3