Fix leak of `reason` in _FcConfigParse when not complaining
In "Do not return FcFalse from FcConfigParseAndLoad*() if complain is set to false" [0], _FcConfigParse was updated to return FcTrue early if it was instructed not to complain on errors. In "Take effect sysroot functionality to the default config file" [1] the error messages were factored into a `reason` which was allocated. Be sure to free this `reason` in the case of returning FcTrue early. Discovered with a leak checker while attempting to configure in interesting ways. [0]fcada52291
[1]cd51cb241a
This commit is contained in:
parent
c2666a6d9a
commit
ec3e747d2f
|
@ -3689,7 +3689,10 @@ bail0:
|
|||
if (realfilename)
|
||||
FcStrFree (realfilename);
|
||||
if (!complain)
|
||||
{
|
||||
FcStrBufDestroy (&reason);
|
||||
return FcTrue;
|
||||
}
|
||||
if (!ret && complain_again)
|
||||
{
|
||||
if (name)
|
||||
|
|
Loading…
Reference in New Issue