trivial code optimization

This commit is contained in:
Akira TAGOH 2013-07-09 16:43:26 +09:00
parent d420e1df98
commit 04bd904632
1 changed files with 4 additions and 2 deletions

View File

@ -69,8 +69,8 @@ FcTestDestroy (FcTest *test)
void
FcRuleDestroy (FcRule *rule)
{
if (rule->next)
FcRuleDestroy (rule->next);
FcRule *n = rule->next;
switch (rule->type) {
case FcRuleTest:
FcTestDestroy (rule->u.test);
@ -82,6 +82,8 @@ FcRuleDestroy (FcRule *rule)
break;
}
free (rule);
if (n)
FcRuleDestroy (n);
}
static FcExpr *