Integrated: 8316975: Memory leak in MTLSurfaceData
Jayathirth D V
jdv at openjdk.org
Wed Oct 11 03:39:17 UTC 2023
On Tue, 10 Oct 2023 12:03:23 GMT, Jayathirth D V <jdv at 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.
This pull request has now been integrated.
Changeset: 3aa4cba1
Author: Jayathirth D V <jdv at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/3aa4cba17520a488aa4a338a80f573af10d3e657
Stats: 12 lines in 1 file changed: 5 ins; 5 del; 2 mod
8316975: Memory leak in MTLSurfaceData
Reviewed-by: prr
-------------
PR: https://git.openjdk.org/jdk/pull/16117
More information about the client-libs-dev
mailing list