Revert "Always free locally defined macros when they go out of scope"
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 7 Jan 2010 10:04:53 +0000 (12:04 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 7 Jan 2010 10:04:53 +0000 (12:04 +0200)
- the "fix" breaks seemingly legitimate use in fedora font package
  macros, possibly some funky interaction with %{lua: } macros or something
- this reverts commit f895acd285366cf58cc3c97b5f188fecbfd782a8.

rpmio/macro.c

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