rpm/rpm-5.4.7-fix-minor-memleaks.patch

26 lines
959 B
Diff
Raw Normal View History

2012-08-01 14:59:23 +04:00
--- rpm-5.4.7/build/parseReqs.c.memleak~ 2012-03-21 19:13:54.725053861 +0100
+++ rpm-5.4.7/build/parseReqs.c 2012-03-21 19:13:57.755057614 +0100
@@ -177,7 +177,7 @@ rpmRC parseRCPOT(Spec spec, Package pkg,
if (!(nr > 3 && EVR[0] == '%' && EVR[1] == '{' && EVR[nr-1] == '}'))
{
memset(evr, 0, sizeof(*evr));
- ix = rpmEVRparse(xstrdup(EVR), evr);
+ ix = rpmEVRparse(EVR, evr);
evr->str = _free(evr->str);
}
if (ix != 0) {
--- rpm-5.4.7/rpmio/macro.c.memleak~ 2012-03-21 19:16:07.453218370 +0100
+++ rpm-5.4.7/rpmio/macro.c 2012-03-21 19:19:33.758488216 +0100
@@ -2818,8 +2818,10 @@ rpmLoadMacroFile(MacroContext mc, const
}
se = rpmMCExpand(mc, s, NULL);
rc = rpmGlob(se, &argc, &argv);
- for(i = 0; i < argc; i++)
+ for(i = 0; i < argc; i++) {
rc |= rpmLoadMacroFile(mc, argv[i], nesting - 1);
+ argv[i] = _free(argv[i]);
+ }
argv = _free(argv);
se = _free(se);
if (rc != 0)