On Tue, 10 Oct 2023 12:03:23 GMT, Jayathirth D V <j...@openjdk.org> wrote:
> In MTLSurfaceData_initOps() we return if "(gc == NULL)" but we don't free > already allocated "mtlsdo" using (MTLSDOps *)malloc(sizeof(MTLSDOps)) which > is of 40 bytes. > > We need to free(mtlsdo) before we return from MTLSurfaceData_initOps() for > any reasons. Moved (mtlsdo == NULL) check right after we allocate it and > added logic to delete mtlsdo(40 bytes) at appropriate places. > > There is no regression test because to reproduce this issue we need to > exhaust system memory. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/16117#pullrequestreview-1668698858