Fix dumb memory handling bug.
authormarc <devnull@localhost>
Sat, 28 Feb 1998 16:58:23 +0000 (16:58 +0000)
committermarc <devnull@localhost>
Sat, 28 Feb 1998 16:58:23 +0000 (16:58 +0000)
CVS patchset: 2013
CVS date: 1998/02/28 16:58:23

CHANGES
build/files.c

diff --git a/CHANGES b/CHANGES
index 1a82633..dcf3908 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
        - need to create popt/configure during make archive
        - added comments about modifictation to base popt and rpmrc files
        - allow spaces in group names
+       - fix bug in memory allocation of special doc stuff
 
 2.4.101 -> 2.4.102:
        - fixed spelling of "instchangelog" in lib-rpmrc.in
index 28ed032..41ec9fc 100644 (file)
@@ -321,6 +321,8 @@ static int processPackageFiles(Spec spec, Package pkg, int installSpecialDoc)
     fl.def.PdirmodeString = NULL;
     fl.def.Uname = NULL;
     fl.def.Gname = NULL;
+    fl.def.Pmode = 0;
+    fl.def.Pdirmode = 0;
     fl.currentLang = NULL;
 
     fl.defVerifyFlags = RPMVERIFY_ALL;
@@ -424,13 +426,11 @@ static int processPackageFiles(Spec spec, Package pkg, int installSpecialDoc)
        if (installSpecialDoc) {
            doScript(spec, RPMBUILD_STRINGBUF, "%doc", pkg->specialDoc, 0);
        }
+       /* fl.current now takes on "ownership" of the specialDocAttrRec */
+       /* allocated string data.                                       */
        fl.current = specialDocAttrRec;
        processBinaryFile(pkg, &fl, specialDoc);
        FREE(specialDoc);
-       FREE(specialDocAttrRec.PmodeString);
-       FREE(specialDocAttrRec.PdirmodeString);
-       FREE(specialDocAttrRec.Uname);
-       FREE(specialDocAttrRec.Gname);
     }
     
     FREE(files);