Fix leaks
This commit is contained in:
parent
f098adac54
commit
684c3ce685
|
@ -2777,6 +2777,11 @@ FcParseAcceptRejectFont (FcConfigParse *parse, FcElement element)
|
||||||
{
|
{
|
||||||
FcConfigMessage (parse, FcSevereError, "out of memory");
|
FcConfigMessage (parse, FcSevereError, "out of memory");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (parse->scanOnly && vstack->u.string)
|
||||||
|
FcStrFree (vstack->u.string);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case FcVStackPattern:
|
case FcVStackPattern:
|
||||||
if (!parse->scanOnly && !FcConfigPatternsAdd (parse->config,
|
if (!parse->scanOnly && !FcConfigPatternsAdd (parse->config,
|
||||||
|
@ -2786,7 +2791,11 @@ FcParseAcceptRejectFont (FcConfigParse *parse, FcElement element)
|
||||||
FcConfigMessage (parse, FcSevereError, "out of memory");
|
FcConfigMessage (parse, FcSevereError, "out of memory");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (parse->scanOnly && vstack->u.pattern)
|
||||||
|
FcPatternDestroy (vstack->u.pattern);
|
||||||
vstack->tag = FcVStackNone;
|
vstack->tag = FcVStackNone;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FcConfigMessage (parse, FcSevereWarning, "bad font selector");
|
FcConfigMessage (parse, FcSevereWarning, "bad font selector");
|
||||||
|
|
Loading…
Reference in New Issue