rpm/rpm-4.12-beta-rpmdeps.patch
2014-08-20 11:55:23 +03:00

30 lines
814 B
Diff

diff --git a/build/rpmfc.c b/build/rpmfc.c
index e798950..94089e5 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -760,6 +760,7 @@ rpmfc rpmfcCreate(const char *buildRoot, rpmFlags flags)
fc->buildRoot = xstrdup(buildRoot);
fc->brlen = strlen(buildRoot);
}
+ fc->pkg = xcalloc(1, sizeof(*fc->pkg));
fc->pool = rpmstrPoolCreate();
return fc;
}
@@ -1263,6 +1264,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
av[ac] = NULL;
fc = rpmfcCreate(spec->buildRoot, 0);
+ free(fc->pkg); /* XXX HACK */
fc->pkg = pkg;
fc->skipProv = !pkg->autoProv;
fc->skipReq = !pkg->autoReq;
@@ -1337,6 +1339,8 @@ exit:
/* Clean up. */
free(fmode);
+ if (fc)
+ fc->pkg = NULL; /* XXX HACK */
rpmfcFree(fc);
argvFree(av);
rpmfiFree(fi);