image: Free allocated memory on error path
This commit is contained in:
committed by
Kristian Høgsberg
parent
f0a1af9f02
commit
409f79a2c7
@@ -373,6 +373,7 @@ image_create(struct display *display, const char *filename,
|
|||||||
|
|
||||||
if (!image->image) {
|
if (!image->image) {
|
||||||
fprintf(stderr, "could not find the image %s!\n", b);
|
fprintf(stderr, "could not find the image %s!\n", b);
|
||||||
|
free(image);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user