image: Free allocated memory on error path
authorRob Bradford <rob@linux.intel.com>
Thu, 10 Jan 2013 19:48:55 +0000 (19:48 +0000)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 10 Jan 2013 21:07:23 +0000 (16:07 -0500)
clients/image.c

index 6a2bda3..e25a665 100644 (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);
                return NULL;
        }