From: Akira TAGOH Date: Tue, 9 Jul 2013 07:43:26 +0000 (+0900) Subject: trivial code optimization X-Git-Tag: 2.10.94~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=04bd904632b22682c888f658650cdcd322544273;p=platform%2Fupstream%2Ffontconfig.git trivial code optimization --- diff --git a/src/fcxml.c b/src/fcxml.c index 61dc630..6a2af85 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -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 *