diff options
Diffstat (limited to 'fontconfig/src')
-rw-r--r-- | fontconfig/src/fcxml.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c index 61dc6300b..6a2af85e3 100644 --- a/fontconfig/src/fcxml.c +++ b/fontconfig/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 * |