image: Free filename saved into structure on error path
This commit is contained in:
parent
307e09ee34
commit
c9213e7353
|
@ -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->filename);
|
||||||
free(image);
|
free(image);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue