image: Free filename saved into structure on error path

This commit is contained in:
Rob Bradford 2013-07-26 16:29:41 +01:00 committed by Kristian Høgsberg
parent f49bbf9755
commit f01d5647dc

View file

@ -373,6 +373,7 @@ image_create(struct display *display, const char *filename,
if (!image->image) {
fprintf(stderr, "could not find the image %s!\n", b);
free(image->filename);
free(image);
return NULL;
}