Coverity #650: Fix a memory leak when near OOM.
authorAdam Jackson <ajax@freedesktop.org>
Sun, 2 Apr 2006 23:15:35 +0000 (23:15 +0000)
committerAdam Jackson <ajax@freedesktop.org>
Sun, 2 Apr 2006 23:15:35 +0000 (23:15 +0000)
src/mesa/drivers/dri/tdfx/tdfx_tex.c

index d8a80534bb9bf85398efd992cb2ab19a7235c1ec..f293c3f2f826e9a8a443c90cc8d4de4e80487021 100644 (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 */