From: Adam Jackson Date: Sun, 2 Apr 2006 23:15:35 +0000 (+0000) Subject: Coverity #650: Fix a memory leak when near OOM. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ee92f984b31b1ba2653f51bf739a2e03f386c63;p=mesa.git Coverity #650: Fix a memory leak when near OOM. --- diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tex.c b/src/mesa/drivers/dri/tdfx/tdfx_tex.c index d8a80534bb9..f293c3f2f82 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 */