Commit 0aa5fbaa authored by Keith Packard's avatar Keith Packard

Fix OOM failure case in FcPStackPush.

When allocation for the node attributes fail, clean up the node allocation
and report failure.
parent 0f787088
......@@ -968,7 +968,12 @@ FcPStackPush (FcConfigParse *parse, FcElement element, const XML_Char **attr)
new->attr = FcConfigSaveAttr (attr);
if (!new->attr)
FcConfigMessage (parse, FcSevereError, "out of memory");
FcMemFree (FC_MEM_PSTACK, sizeof (FcPStack));
free (new);
return FcFalse;
new->attr = 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment