projects
/
platform
/
upstream
/
fontconfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d420e1d
)
trivial code optimization
author
Akira TAGOH
<akira@tagoh.org>
Tue, 9 Jul 2013 07:43:26 +0000
(16:43 +0900)
committer
Akira TAGOH
<akira@tagoh.org>
Tue, 9 Jul 2013 07:43:26 +0000
(16:43 +0900)
src/fcxml.c
patch
|
blob
|
history
diff --git
a/src/fcxml.c
b/src/fcxml.c
index
61dc630
..
6a2af85
100644
(file)
--- 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 *