[Fontconfig] fontconfig: Branch 'master'

Akira TAGOH tagoh at kemper.freedesktop.org
Tue Jul 9 00:43:42 PDT 2013


 src/fcxml.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 04bd904632b22682c888f658650cdcd322544273
Author: Akira TAGOH <akira at tagoh.org>
Date:   Tue Jul 9 16:43:26 2013 +0900

    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 *


More information about the Fontconfig mailing list