From 05eb59911da9b58d682501e162566dcd5f5a1a24 Mon Sep 17 00:00:00 2001 From: Alexey Tourbin Date: Thu, 6 Jan 2011 05:52:17 +0300 Subject: [PATCH] macro.c: fixed macroTable corruption in freeArgs --- rpmio/macro.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpmio/macro.c b/rpmio/macro.c index 46f849f..98290df 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -770,7 +770,7 @@ freeArgs(MacroBuf mb) me = *mep; if (me->level < mb->depth) - continue; + goto skip; if (strlen(me->name) == 1 && strchr("#*0", *me->name)) { if (*me->name == '*' && me->used > 0) skiptest = 1; /* XXX skip test for %# %* %0 */ @@ -782,6 +782,7 @@ freeArgs(MacroBuf mb) #endif } popMacro(mep); + skip: if (*mep == NULL) ndeleted++; else if (ndeleted) {