Always free locally defined macros when they go out of scope

- Prior to this, local defines in constructs like %{!?foo: %define foo bar}
  would remain defined until a parametrized macro gets called, causing
  obscure and confusing errors in specs such as RhBug:551971 and countless
  others. Use of %global is now always required for such constructs.
This commit is contained in:
Panu Matilainen 2010-01-04 12:20:09 +02:00
parent 2c5ea0b188
commit f895acd285
1 changed files with 2 additions and 3 deletions

View File

@ -1344,9 +1344,8 @@ expandMacro(MacroBuf mb)
me->used++; /* Mark macro as used */
}
/* Free args for "%name " macros with opts */
if (me->opts != NULL)
freeArgs(mb);
/* Free locally defined macros, such as macro options */
freeArgs(mb);
s = se;
}