aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcxml.c
diff options
context:
space:
mode:
Diffstat (limited to 'fontconfig/src/fcxml.c')
-rw-r--r--fontconfig/src/fcxml.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c
index eb8d26ac0..9cb1fb2ba 100644
--- a/fontconfig/src/fcxml.c
+++ b/fontconfig/src/fcxml.c
@@ -2510,7 +2510,6 @@ FcParseMatch (FcConfigParse *parse)
{
const FcChar8 *kind_name;
FcMatchKind kind;
- FcEdit *edit = 0;
FcVStack *vstack;
FcRule *rule = NULL, *r;
@@ -2546,8 +2545,10 @@ FcParseMatch (FcConfigParse *parse)
{
FcConfigMessage (parse, FcSevereError,
"<match target=\"scan\"> cannot edit user-defined object \"%s\"",
- FcObjectName(edit->object));
- break;
+ FcObjectName(vstack->u.edit->object));
+ if (rule)
+ FcRuleDestroy (rule);
+ return;
}
r = FcRuleCreate (FcRuleEdit, vstack->u.edit);
if (rule)