devilhorns pushed a commit to branch master.
commit 7e222b949cc45c860d778080c5a0e02f8e00365d
Author: Chris Michael <[email protected]>
Date: Fri Jun 28 13:57:56 2013 +0100
Fix klockwork memleak: If we allocate a colormap above, then we need
to free it on error.
Signed-off-by: Chris Michael <[email protected]>
---
src/bin/evas/loaders/xpm/evas_image_load_xpm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/bin/evas/loaders/xpm/evas_image_load_xpm.c
b/src/bin/evas/loaders/xpm/evas_image_load_xpm.c
index e8f52bb..27a318d 100644
--- a/src/bin/evas/loaders/xpm/evas_image_load_xpm.c
+++ b/src/bin/evas/loaders/xpm/evas_image_load_xpm.c
@@ -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);
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev