From 1ee92f984b31b1ba2653f51bf739a2e03f386c63 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sun, 2 Apr 2006 23:15:35 +0000 Subject: Coverity #650: Fix a memory leak when near OOM. --- src/mesa/drivers/dri/tdfx/tdfx_tex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tex.c b/src/mesa/drivers/dri/tdfx/tdfx_tex.c index d8a80534bb..f293c3f2f8 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_tex.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_tex.c @@ -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 */ -- cgit v1.2.3