image: Free allocated memory on error path

This commit is contained in:
Rob Bradford
2013-01-10 19:48:55 +00:00
committed by Kristian Høgsberg
parent f0a1af9f02
commit 409f79a2c7
+1
View File
@@ -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;
} }