summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/files.c14
-rw-r--r--build/rpmbuild.h15
-rw-r--r--build/spec.c14
3 files changed, 19 insertions, 24 deletions
diff --git a/build/files.c b/build/files.c
index d07fb3855..b08cf5e5e 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1365,17 +1365,16 @@ static void genCpioListAndHeader(/*@partial@*/ FileList fl,
(void) rpmlibNeedsFeature(h, "CompressedFileNames", "3.0.4-1");
}
- { rpmfi fi = xcalloc(1, sizeof(*fi));
- int scareMem = 1;
+ { int scareMem = 1;
+ rpmts ts = NULL; /* XXX FIXME drill rpmts ts all the way down here */
+ rpmfi fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem);
char * a, * d;
- /* XXX FIXME drill rpmts ts all the way down here */
-/*@i@*/ fi->te = xcalloc(1, sizeof(*fi->te));
-/*@i@*/ fi->te->type = TR_ADDED;
-
- fi = rpmfiNew(NULL, fi, h, RPMTAG_BASENAMES, scareMem);
if (fi == NULL) return; /* XXX can't happen */
+ fi->te = xcalloc(1, sizeof(*fi->te));
+ fi->te->type = TR_ADDED;
+
fi->dnl = _free(fi->dnl);
fi->bnl = _free(fi->bnl);
@@ -2332,6 +2331,7 @@ static StringBuf getOutputFrom(char * dir, char * argv[],
(void) chdir(dir);
}
+ unsetenv("MALLOC_CHECK_");
(void) execvp(argv[0], argv);
/* XXX this error message is probably not seen. */
rpmError(RPMERR_EXEC, _("Couldn't exec %s: %s\n"),
diff --git a/build/rpmbuild.h b/build/rpmbuild.h
index 2f42550fc..798583675 100644
--- a/build/rpmbuild.h
+++ b/build/rpmbuild.h
@@ -363,7 +363,8 @@ int lookupPackage(Spec spec, /*@null@*/ const char * name, int flag,
* @param spec spec file control structure
* @return package control structure
*/
-/*@only@*/ Package newPackage(Spec spec)
+/*@only@*/
+Package newPackage(Spec spec)
/*@modifies spec->packages, spec->packages->next @*/;
/** \ingroup rpmbuild
@@ -371,16 +372,20 @@ int lookupPackage(Spec spec, /*@null@*/ const char * name, int flag,
* @param packages package control structure chain
* @return NULL
*/
-/*@null@*/ Package freePackages(/*@only@*/ /*@null@*/ Package packages)
- /*@modifies packages @*/;
+/*@null@*/
+Package freePackages(/*@only@*/ /*@null@*/ Package packages)
+ /*@globals fileSystem @*/
+ /*@modifies packages, fileSystem @*/;
/** \ingroup rpmbuild
* Destroy package control structure.
* @param pkg package control structure
* @return NULL
*/
-/*@null@*/ Package freePackage(/*@only@*/ /*@null@*/ Package pkg)
- /*@modifies pkg @*/;
+/*@null@*/
+Package freePackage(/*@only@*/ /*@null@*/ Package pkg)
+ /*@globals fileSystem @*/
+ /*@modifies pkg, fileSystem @*/;
/** \ingroup rpmbuild
* Add dependency to header, filtering duplicates.
diff --git a/build/spec.c b/build/spec.c
index 3a7797f21..9b830072c 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -167,12 +167,7 @@ Package freePackage(Package pkg)
if (pkg->cpioList) {
rpmfi fi = pkg->cpioList;
pkg->cpioList = NULL;
- fi = rpmfiFree(fi, 1);
-#ifdef DYING
- /*@-refcounttrans@*/ /* FIX: fi needs to be only */
- fi = _free(fi);
- /*@=refcounttrans@*/
-#endif
+ fi = rpmfiFree(fi);
}
pkg->specialDoc = freeStringBuf(pkg->specialDoc);
@@ -525,12 +520,7 @@ Spec freeSpec(Spec spec)
if (spec->sourceCpioList) {
rpmfi fi = spec->sourceCpioList;
spec->sourceCpioList = NULL;
- fi = rpmfiFree(fi, 1);
-#ifdef DYING
- /*@-refcounttrans@*/ /* FIX: fi needs to be only */
- fi = _free(fi);
- /*@=refcounttrans@*/
-#endif
+ fi = rpmfiFree(fi);
}
spec->buildRestrictions = headerFree(spec->buildRestrictions);