[OpenJDK 2D-Dev] RFR: JDK-8260432: allocateSpaceForGP in freetypeScaler.c might leak memory
Thomas Stuefe
stuefe at openjdk.java.net
Wed Jan 27 12:19:41 UTC 2021
On Wed, 27 Jan 2021 12:02:06 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Then we would free as well for the realloc code path
>> } else {
>> /* do we have enough space? */
>> ...
>> }
>> Is this okay?
>
> Yes, I think that is better: `realloc` can fail as well, and we don't want to leak those?
Please also reset the free'd pointers to NULL in GPData* before returning.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2250
More information about the 2d-dev
mailing list