summaryrefslogtreecommitdiff
path: root/build/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'build/files.c')
-rw-r--r--build/files.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/build/files.c b/build/files.c
index cec098cc7..513c3d5d2 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1252,6 +1252,15 @@ static FileRecords FileRecordsFree(FileRecords files)
return NULL;
}
+static void FileListFree(FileList fl)
+{
+ FileEntryFree(&(fl->cur));
+ FileEntryFree(&(fl->def));
+ FileRecordsFree(&(fl->files));
+ free(fl->buildRoot);
+ argvFree(fl->docDirs);
+}
+
/* forward ref */
static rpmRC recurseDir(FileList fl, const char * diskPath);
@@ -1898,13 +1907,7 @@ static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
fl.processingFailed = 1;
exit:
- fl.buildRoot = _free(fl.buildRoot);
-
- FileEntryFree(&fl.cur);
- FileEntryFree(&fl.def);
-
- FileRecordsFree(&fl.files);
- argvFree(fl.docDirs);
+ FileListFree(&fl);
specialDirFree(specialDoc);
return fl.processingFailed ? RPMRC_FAIL : RPMRC_OK;
}
@@ -2037,8 +2040,7 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags)
}
}
- FileRecordsFree(&fl.files);
- freeAttrRec(&fl.def.ar);
+ FileListFree(&fl);
return fl.processingFailed ? RPMRC_FAIL : RPMRC_OK;
}