Coverity #650: Fix a memory leak when near OOM.
This commit is contained in:
parent
75f81ad5f9
commit
1ee92f984b
|
@ -1213,6 +1213,7 @@ adjust2DRatio (GLcontext *ctx,
|
|||
}
|
||||
tempImage = MALLOC(newWidth * newHeight * rawBytes);
|
||||
if (!tempImage) {
|
||||
FREE(rawImage);
|
||||
return GL_FALSE;
|
||||
}
|
||||
/* unpack image, apply transfer ops and store in rawImage */
|
||||
|
|
Loading…
Reference in New Issue