From: Vinson Lee Date: Sat, 5 Dec 2009 09:43:29 +0000 (-0800) Subject: progs/samples: Fix memory leak if malloc fails in rgbtoppm.c. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1446f30875bfb3b633942bc710b061019472f788;p=mesa.git progs/samples: Fix memory leak if malloc fails in rgbtoppm.c. --- diff --git a/progs/samples/rgbtoppm.c b/progs/samples/rgbtoppm.c index 6652bb32ec1..56ca5b0efe9 100644 --- a/progs/samples/rgbtoppm.c +++ b/progs/samples/rgbtoppm.c @@ -225,6 +225,7 @@ read_rgb_texture(char *name, int *width, int *height) if (gbuf) free(gbuf); if (bbuf) free(bbuf); if (abuf) free(abuf); + ImageClose(image); return NULL; } ptr = base;