Coverity #650: Fix a memory leak when near OOM.

This commit is contained in:
Adam Jackson 2006-04-02 23:15:35 +00:00
parent 75f81ad5f9
commit 1ee92f984b
1 changed files with 1 additions and 0 deletions

View File

@ -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 */