Fix klockwork memleak: If we allocate a colormap above, then we need
authorChris Michael <cp.michael@samsung.com>
Fri, 28 Jun 2013 12:57:56 +0000 (13:57 +0100)
committerChris Michael <cp.michael@samsung.com>
Fri, 28 Jun 2013 12:57:56 +0000 (13:57 +0100)
to free it on error.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/bin/evas/loaders/xpm/evas_image_load_xpm.c

index e8f52bb..27a318d 100644 (file)
@@ -634,6 +634,7 @@ evas_image_load_file_xpm(Evas_Img_Load_Params *ilp, const char *file, const char
    return EINA_TRUE;
 
  on_error:
+   if (cmap) free(cmap);
    free(line);
    eina_file_map_free(f, (void*) map);
    eina_file_close(f);