Fix uninitialized memory access when failing memory allocation.
FamilyTableInit() is called after allocating memory. but FamilyTableClear() may be called when the allocation is failed. Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/374 Reported by Andreas Falkenhahn
This commit is contained in:
parent
f07d7c67e4
commit
2fb3419a92
|
@ -2275,8 +2275,8 @@ FcConfigSubstituteWithPat (FcConfig *config,
|
|||
printf ("FcConfigSubstitute done");
|
||||
FcPatternPrint (p);
|
||||
}
|
||||
bail1:
|
||||
FamilyTableClear (&data);
|
||||
bail1:
|
||||
if (elt)
|
||||
free (elt);
|
||||
if (value)
|
||||
|
|
Loading…
Reference in New Issue