progs/samples: Fix memory leak if malloc fails in rgbtoppm.c.

This commit is contained in:
Vinson Lee 2009-12-05 01:43:29 -08:00
parent 412aeeed1c
commit 1446f30875

View file

@ -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;