Skip to content

Commit be5ae4c

Browse files
committed
8363676: [GCC static analyzer] missing return value check of malloc in OGLContext_SetTransform
Backport-of: d25ad881ebfec40ca6b0a73f78d1f9d2cb722e01
1 parent bd1728a commit be5ae4c

File tree

1 file changed

+1
-0
lines changed
  • src/java.desktop/share/native/common/java2d/opengl

1 file changed

+1
-0
lines changed

src/java.desktop/share/native/common/java2d/opengl/OGLContext.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,7 @@ OGLContext_SetTransform(OGLContext *oglc,
484484
if (oglc->xformMatrix == NULL) {
485485
size_t arrsize = 16 * sizeof(GLdouble);
486486
oglc->xformMatrix = (GLdouble *)malloc(arrsize);
487+
RETURN_IF_NULL(oglc->xformMatrix);
487488
memset(oglc->xformMatrix, 0, arrsize);
488489
oglc->xformMatrix[10] = 1.0;
489490
oglc->xformMatrix[15] = 1.0;

0 commit comments

Comments
 (0)