mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 09:58:05 +02:00
progs/samples: Fix memory leak if malloc fails in rgbtoppm.c.
This commit is contained in:
parent
412aeeed1c
commit
1446f30875
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue