summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/files.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/build/files.c b/build/files.c
index edba92a26..2d3767698 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1720,11 +1720,13 @@ static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
struct FileList_s fl;
const char *fileName;
char buf[BUFSIZ];
- struct AttrRec_s arbuf;
+ struct AttrRec_s arbuf, def_arbuf;
AttrRec specialDocAttrRec = &arbuf;
+ AttrRec def_specialDocAttrRec = &def_arbuf;
char *specialDoc = NULL;
nullAttrRec(specialDocAttrRec);
+ nullAttrRec(def_specialDocAttrRec);
pkg->cpioList = NULL;
if (pkg->fileFile) {
@@ -1862,6 +1864,7 @@ static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
specialDoc = _free(specialDoc);
specialDoc = xstrdup(fileName);
dupAttrRec(&fl.cur_ar, specialDocAttrRec);
+ dupAttrRec(&fl.def_ar, def_specialDocAttrRec);
} else if (fl.currentFlags & RPMFILE_PUBKEY) {
(void) processMetadataFile(pkg, &fl, fileName, RPMTAG_PUBKEYS);
} else {
@@ -1902,7 +1905,9 @@ static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
fl.nLangs = 0;
dupAttrRec(specialDocAttrRec, &fl.cur_ar);
+ dupAttrRec(def_specialDocAttrRec, &fl.def_ar);
freeAttrRec(specialDocAttrRec);
+ freeAttrRec(def_specialDocAttrRec);
(void) processBinaryFile(pkg, &fl, specialDoc);