OSDN Git Service

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 d8a8053..f293c3f 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 */