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 307e09ee34
commit c9213e7353
1 changed files with 1 additions and 0 deletions

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