[PATCH weston 07/11] image: Free filename saved into structure on error path

Rob Bradford robert.bradford at intel.com
Fri Jul 26 08:29:41 PDT 2013


From: Rob Bradford <rob at linux.intel.com>

---
 clients/image.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clients/image.c b/clients/image.c
index cbd466c..1f3c77c 100644
--- a/clients/image.c
+++ b/clients/image.c
@@ -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;
 	}
-- 
1.8.3.1



More information about the wayland-devel mailing list