mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8363676: [GCC static analyzer] missing return value check of malloc in OGLContext_SetTransform
Reviewed-by: psadhukhan
This commit is contained in:
parent
011de4c894
commit
d25ad881eb
@ -484,6 +484,7 @@ OGLContext_SetTransform(OGLContext *oglc,
|
||||
if (oglc->xformMatrix == NULL) {
|
||||
size_t arrsize = 16 * sizeof(GLdouble);
|
||||
oglc->xformMatrix = (GLdouble *)malloc(arrsize);
|
||||
RETURN_IF_NULL(oglc->xformMatrix);
|
||||
memset(oglc->xformMatrix, 0, arrsize);
|
||||
oglc->xformMatrix[10] = 1.0;
|
||||
oglc->xformMatrix[15] = 1.0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user