| Summary: | wrong logic? after malloc fails in fcxml.c | ||
|---|---|---|---|
| Product: | fontconfig | Reporter: | Hongbo Zhao <hongbo.zhao> |
| Component: | library | Assignee: | Keith Packard <keithp> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | trivial | ||
| Priority: | low | ||
| Version: | 2.5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
| Bug Depends on: | |||
| Bug Blocks: | 14062 | ||
I think it should read:
if (!new->attr)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
FcMemFree (FC_MEM_PSTACK, sizeof (FcPStack));
free (new);
return FcFalse;
}
so that it cleans up the other allocation.
Fixed some time ago. Thanks! |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
For version 2.5.0, on line 970 and 971 in source file fcxml.c, in subroutine FcPStackPush(), Original lines: if (!new->attr) FcConfigMessage (parse, FcSevereError, "out of memory"); Should change to: if (!new->attr) { FcConfigMessage (parse, FcSevereError, "out of memory"); return FcFalse; }