summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-12-05 01:43:29 -0800
committerVinson Lee <vlee@vmware.com>2009-12-05 01:43:29 -0800
commit1446f30875bfb3b633942bc710b061019472f788 (patch)
treea43e7c51ff3f7f6188b4898240eaec6855c816c4 /progs
parent412aeeed1c392ab5796c85287fc6ebdccd74880c (diff)
progs/samples: Fix memory leak if malloc fails in rgbtoppm.c.
Diffstat (limited to 'progs')
-rw-r--r--progs/samples/rgbtoppm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/progs/samples/rgbtoppm.c b/progs/samples/rgbtoppm.c
index 6652bb32ec..56ca5b0efe 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;