From: Mike Blumenkrantz Date: Mon, 20 May 2013 09:25:49 +0000 (+0100) Subject: fix possible memleak when creating new app menu entries X-Git-Tag: submit/efl/20131021.015651~616 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b8c6fc89af60b4f13c5748478e4c71f261bc295;p=platform%2Fupstream%2Fenlightenment.git fix possible memleak when creating new app menu entries klocwork issue --- diff --git a/src/bin/e_int_menus.c b/src/bin/e_int_menus.c index 0d916ca..6a3badd 100644 --- a/src/bin/e_int_menus.c +++ b/src/bin/e_int_menus.c @@ -723,7 +723,13 @@ _e_int_menus_app_config_append(Efreet_Desktop *desktop) EINA_LIST_FOREACH_SAFE(e_config->menu_applications, l, l_next, ma) { if ((!strcmp(ma->orig_path, cma->orig_path)) && (ma->load_time == cma->load_time)) - return ma->exec_valid; + { + eina_stringshare_del(cma->orig_path); + eina_stringshare_del(cma->try_exec); + eina_stringshare_del(cma->exec); + free(cma); + return ma->exec_valid; + } if ((!strcmp(ma->orig_path, cma->orig_path)) && (ma->load_time != cma->load_time)) {