summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Villard <rustyBSD@gmx.fr>2012-12-21 21:31:13 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-21 21:31:13 +0000
commit4a52c4626891581ed55cdc3b3c1c604f4c7d4d17 (patch)
tree355e163a5c34fe318c5e698c80185da9c888f0cc
parentd11c1cc6b146cd203aef67461ddbcc8eae85d1b2 (diff)
From: Maxime Villard <rustyBSD@gmx.fr>
Subject: [E-devel] [e][PATCH] Optimizations v2 Date: Fri, 21 Dec 2012 22:17:32 +0100 Hi, same patch as before: removed useless nullchecks and switched some free()'s to E_FREE(). SVN revision: 81592
-rw-r--r--src/modules/battery/e_mod_openbsd.c3
-rw-r--r--src/modules/comp/e_mod_comp.c23
-rw-r--r--src/modules/comp/e_mod_comp_update.c2
-rw-r--r--src/modules/comp/e_mod_comp_wl_shell.c4
-rw-r--r--src/modules/comp/e_mod_config.c20
-rw-r--r--src/modules/conf_display/e_int_config_desk.c6
-rw-r--r--src/modules/conf_edgebindings/e_int_config_edgebindings.c12
-rw-r--r--src/modules/conf_keybindings/e_int_config_keybindings.c6
-rw-r--r--src/modules/conf_keybindings/e_int_config_mousebindings.c10
-rw-r--r--src/modules/conf_menus/e_int_config_menus.c4
-rw-r--r--src/modules/conf_paths/e_int_config_env.c4
-rw-r--r--src/modules/conf_randr/e_smart_monitor.c2
-rw-r--r--src/modules/conf_wallpaper2/e_int_config_wallpaper.c17
-rw-r--r--src/modules/cpufreq/e_mod_main.c4
-rw-r--r--src/modules/dropshadow/e_mod_main.c15
-rw-r--r--src/modules/everything/evry_plug_apps.c4
-rw-r--r--src/modules/illume-home/e_mod_main.c4
-rw-r--r--src/modules/illume-keyboard/e_kbd_dict.c4
-rw-r--r--src/modules/illume-keyboard/e_kbd_int.c11
-rw-r--r--src/modules/illume2/e_mod_config_policy.c2
-rw-r--r--src/modules/illume2/e_mod_policy.c4
-rw-r--r--src/modules/illume2/e_mod_select_window.c12
-rw-r--r--src/modules/shot/e_mod_main.c2
23 files changed, 78 insertions, 97 deletions
diff --git a/src/modules/battery/e_mod_openbsd.c b/src/modules/battery/e_mod_openbsd.c
index 0bf614d4b..2876fb15a 100644
--- a/src/modules/battery/e_mod_openbsd.c
+++ b/src/modules/battery/e_mod_openbsd.c
@@ -78,8 +78,7 @@ _battery_openbsd_start(void)
78void 78void
79_battery_openbsd_stop(void) 79_battery_openbsd_stop(void)
80{ 80{
81 if (ac) 81 free(ac);
82 free(ac);
83 if (bat) 82 if (bat)
84 { 83 {
85 eina_stringshare_del(bat->udi); 84 eina_stringshare_del(bat->udi);
diff --git a/src/modules/comp/e_mod_comp.c b/src/modules/comp/e_mod_comp.c
index 48db4b255..265ef525e 100644
--- a/src/modules/comp/e_mod_comp.c
+++ b/src/modules/comp/e_mod_comp.c
@@ -567,8 +567,7 @@ _e_mod_comp_win_update(E_Comp_Win *cw)
567 } 567 }
568 if (!_e_mod_comp_win_shaped_check(cw, cw->rects, cw->rects_num)) 568 if (!_e_mod_comp_win_shaped_check(cw, cw->rects, cw->rects_num))
569 { 569 {
570 free(cw->rects); 570 E_FREE(cw->rects);
571 cw->rects = NULL;
572 cw->rects_num = 0; 571 cw->rects_num = 0;
573 } 572 }
574 if ((cw->rects) && (!cw->shaped)) 573 if ((cw->rects) && (!cw->shaped))
@@ -1941,7 +1940,7 @@ _e_mod_comp_win_add(E_Comp *c,
1941 cw->title = ecore_x_icccm_title_get(cw->win); 1940 cw->title = ecore_x_icccm_title_get(cw->win);
1942 if (ecore_x_netwm_name_get(cw->win, &netwm_title)) 1941 if (ecore_x_netwm_name_get(cw->win, &netwm_title))
1943 { 1942 {
1944 if (cw->title) free(cw->title); 1943 free(cw->title);
1945 cw->title = netwm_title; 1944 cw->title = netwm_title;
1946 } 1945 }
1947 ecore_x_icccm_name_class_get(cw->win, &cw->name, &cw->clas); 1946 ecore_x_icccm_name_class_get(cw->win, &cw->name, &cw->clas);
@@ -2092,11 +2091,7 @@ _e_mod_comp_win_del(E_Comp_Win *cw)
2092 2091
2093 e_mod_comp_update_free(cw->up); 2092 e_mod_comp_update_free(cw->up);
2094 DBG(" [0x%x] del\n", cw->win); 2093 DBG(" [0x%x] del\n", cw->win);
2095 if (cw->rects) 2094 E_FREE(cw->rects);
2096 {
2097 free(cw->rects);
2098 cw->rects = NULL;
2099 }
2100 if (cw->update_timeout) 2095 if (cw->update_timeout)
2101 { 2096 {
2102 ecore_timer_del(cw->update_timeout); 2097 ecore_timer_del(cw->update_timeout);
@@ -2159,10 +2154,10 @@ _e_mod_comp_win_del(E_Comp_Win *cw)
2159 if (cw->inhash) 2154 if (cw->inhash)
2160 eina_hash_del(windows, e_util_winid_str_get(cw->win), cw); 2155 eina_hash_del(windows, e_util_winid_str_get(cw->win), cw);
2161 2156
2162 if (cw->title) free(cw->title); 2157 free(cw->title);
2163 if (cw->name) free(cw->name); 2158 free(cw->name);
2164 if (cw->clas) free(cw->clas); 2159 free(cw->clas);
2165 if (cw->role) free(cw->role); 2160 free(cw->role);
2166 cw->c->wins_invalid = 1; 2161 cw->c->wins_invalid = 1;
2167 cw->c->wins = eina_inlist_remove(cw->c->wins, EINA_INLIST_GET(cw)); 2162 cw->c->wins = eina_inlist_remove(cw->c->wins, EINA_INLIST_GET(cw));
2168 pending_count = cw->pending_count; 2163 pending_count = cw->pending_count;
@@ -3836,8 +3831,8 @@ _e_mod_comp_add(E_Manager *man)
3836 ecore_x_sync(); 3831 ecore_x_sync();
3837 continue; 3832 continue;
3838 } 3833 }
3839 if (wname) free(wname); 3834 free(wname);
3840 if (wclass) free(wclass); 3835 free(wclass);
3841 wname = wclass = NULL; 3836 wname = wclass = NULL;
3842 cw = _e_mod_comp_win_add(c, wins[i]); 3837 cw = _e_mod_comp_win_add(c, wins[i]);
3843 if (!cw) continue; 3838 if (!cw) continue;
diff --git a/src/modules/comp/e_mod_comp_update.c b/src/modules/comp/e_mod_comp_update.c
index 3b42623c9..992917b07 100644
--- a/src/modules/comp/e_mod_comp_update.c
+++ b/src/modules/comp/e_mod_comp_update.c
@@ -28,7 +28,7 @@ e_mod_comp_update_new(void)
28void 28void
29e_mod_comp_update_free(E_Update *up) 29e_mod_comp_update_free(E_Update *up)
30{ 30{
31 if (up->tiles) free(up->tiles); 31 free(up->tiles);
32 free(up); 32 free(up);
33} 33}
34 34
diff --git a/src/modules/comp/e_mod_comp_wl_shell.c b/src/modules/comp/e_mod_comp_wl_shell.c
index 1ebfcaf47..8437d5d90 100644
--- a/src/modules/comp/e_mod_comp_wl_shell.c
+++ b/src/modules/comp/e_mod_comp_wl_shell.c
@@ -414,7 +414,7 @@ _e_mod_comp_wl_shell_surface_set_title(struct wl_client *client, struct wl_resou
414 LOGFN(__FILE__, __LINE__, __FUNCTION__); 414 LOGFN(__FILE__, __LINE__, __FUNCTION__);
415 415
416 wss = resource->data; 416 wss = resource->data;
417 if (wss->title) free(wss->title); 417 free(wss->title);
418 wss->title = strdup(title); 418 wss->title = strdup(title);
419} 419}
420 420
@@ -426,7 +426,7 @@ _e_mod_comp_wl_shell_surface_set_class(struct wl_client *client, struct wl_resou
426 LOGFN(__FILE__, __LINE__, __FUNCTION__); 426 LOGFN(__FILE__, __LINE__, __FUNCTION__);
427 427
428 wss = resource->data; 428 wss = resource->data;
429 if (wss->clas) free(wss->clas); 429 free(wss->clas);
430 wss->clas = strdup(clas); 430 wss->clas = strdup(clas);
431} 431}
432 432
diff --git a/src/modules/comp/e_mod_config.c b/src/modules/comp/e_mod_config.c
index 57d0cfb8a..8dc90a49e 100644
--- a/src/modules/comp/e_mod_config.c
+++ b/src/modules/comp/e_mod_config.c
@@ -206,10 +206,10 @@ _match_free(Match_Config *m)
206 if (m->match.clas) eina_stringshare_del(m->match.clas); 206 if (m->match.clas) eina_stringshare_del(m->match.clas);
207 if (m->match.role) eina_stringshare_del(m->match.role); 207 if (m->match.role) eina_stringshare_del(m->match.role);
208 if (m->match.shadow_style) eina_stringshare_del(m->match.shadow_style); 208 if (m->match.shadow_style) eina_stringshare_del(m->match.shadow_style);
209 if (m->title) free(m->title); 209 free(m->title);
210 if (m->name) free(m->name); 210 free(m->name);
211 if (m->clas) free(m->clas); 211 free(m->clas);
212 if (m->role) free(m->role); 212 free(m->role);
213 free(m); 213 free(m);
214} 214}
215 215
@@ -615,32 +615,28 @@ _edit_ok(void *d1,
615 if (m->title) 615 if (m->title)
616 { 616 {
617 if (m->title[0]) m->match.title = eina_stringshare_add(m->title); 617 if (m->title[0]) m->match.title = eina_stringshare_add(m->title);
618 free(m->title); 618 E_FREE(m->title);
619 m->title = NULL;
620 } 619 }
621 if (m->match.name) eina_stringshare_del(m->match.name); 620 if (m->match.name) eina_stringshare_del(m->match.name);
622 m->match.name = NULL; 621 m->match.name = NULL;
623 if (m->name) 622 if (m->name)
624 { 623 {
625 if (m->name[0]) m->match.name = eina_stringshare_add(m->name); 624 if (m->name[0]) m->match.name = eina_stringshare_add(m->name);
626 free(m->name); 625 E_FREE(m->name);
627 m->name = NULL;
628 } 626 }
629 if (m->match.clas) eina_stringshare_del(m->match.clas); 627 if (m->match.clas) eina_stringshare_del(m->match.clas);
630 m->match.clas = NULL; 628 m->match.clas = NULL;
631 if (m->clas) 629 if (m->clas)
632 { 630 {
633 if (m->clas[0]) m->match.clas = eina_stringshare_add(m->clas); 631 if (m->clas[0]) m->match.clas = eina_stringshare_add(m->clas);
634 free(m->clas); 632 E_FREE(m->clas);
635 m->clas = NULL;
636 } 633 }
637 if (m->match.role) eina_stringshare_del(m->match.role); 634 if (m->match.role) eina_stringshare_del(m->match.role);
638 m->match.role = NULL; 635 m->match.role = NULL;
639 if (m->role) 636 if (m->role)
640 { 637 {
641 if (m->role[0]) m->match.role = eina_stringshare_add(m->role); 638 if (m->role[0]) m->match.role = eina_stringshare_add(m->role);
642 free(m->role); 639 E_FREE(m->role);
643 m->role = NULL;
644 } 640 }
645 m->match.borderless = m->borderless; 641 m->match.borderless = m->borderless;
646 m->match.dialog = m->dialog; 642 m->match.dialog = m->dialog;
diff --git a/src/modules/conf_display/e_int_config_desk.c b/src/modules/conf_display/e_int_config_desk.c
index 475e63a6a..9141da3b5 100644
--- a/src/modules/conf_display/e_int_config_desk.c
+++ b/src/modules/conf_display/e_int_config_desk.c
@@ -126,11 +126,9 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
126 if (cfdata->hdl) 126 if (cfdata->hdl)
127 ecore_event_handler_del(cfdata->hdl); 127 ecore_event_handler_del(cfdata->hdl);
128 eina_stringshare_del(cfdata->bg); 128 eina_stringshare_del(cfdata->bg);
129 if (cfdata->name) 129 E_FREE(cfdata->name);
130 E_FREE(cfdata->name);
131#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8) 130#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
132 if (cfdata->profile) 131 E_FREE(cfdata->profile);
133 E_FREE(cfdata->profile);
134#endif 132#endif
135 E_FREE(cfdata); 133 E_FREE(cfdata);
136} 134}
diff --git a/src/modules/conf_edgebindings/e_int_config_edgebindings.c b/src/modules/conf_edgebindings/e_int_config_edgebindings.c
index 475278a9b..ff8ab52b6 100644
--- a/src/modules/conf_edgebindings/e_int_config_edgebindings.c
+++ b/src/modules/conf_edgebindings/e_int_config_edgebindings.c
@@ -178,7 +178,7 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
178 eina_stringshare_del(cfdata->locals.binding); 178 eina_stringshare_del(cfdata->locals.binding);
179 eina_stringshare_del(cfdata->locals.action); 179 eina_stringshare_del(cfdata->locals.action);
180 180
181 if (cfdata->locals.params) free(cfdata->locals.params); 181 free(cfdata->locals.params);
182 E_FREE(cfdata); 182 E_FREE(cfdata);
183} 183}
184 184
@@ -644,7 +644,7 @@ _update_action_list(E_Config_Dialog_Data *cfdata)
644 else 644 else
645 { 645 {
646 e_widget_ilist_unselect(cfdata->gui.o_action_list); 646 e_widget_ilist_unselect(cfdata->gui.o_action_list);
647 if (cfdata->locals.action) free(cfdata->locals.action); 647 free(cfdata->locals.action);
648 cfdata->locals.action = strdup(""); 648 cfdata->locals.action = strdup("");
649 e_widget_entry_clear(cfdata->gui.o_params); 649 e_widget_entry_clear(cfdata->gui.o_params);
650 } 650 }
@@ -924,7 +924,7 @@ _edge_grab_wnd_show(E_Config_Dialog_Data *cfdata)
924 { 924 {
925 label = _edge_binding_text_get(cfdata->locals.edge, ((float)cfdata->locals.delay), cfdata->locals.modifiers); 925 label = _edge_binding_text_get(cfdata->locals.edge, ((float)cfdata->locals.delay), cfdata->locals.modifiers);
926 edje_object_part_text_set(cfdata->gui.o_selector, "e.text.selection", label); 926 edje_object_part_text_set(cfdata->gui.o_selector, "e.text.selection", label);
927 if (label) E_FREE(label); 927 E_FREE(label);
928 } 928 }
929 929
930 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, 930 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
@@ -971,7 +971,7 @@ _edge_grab_wnd_slider_changed_cb(void *data, Evas_Object *obj __UNUSED__)
971 ((float)cfdata->locals.delay), 971 ((float)cfdata->locals.delay),
972 cfdata->locals.modifiers); 972 cfdata->locals.modifiers);
973 edje_object_part_text_set(cfdata->gui.o_selector, "e.text.selection", label); 973 edje_object_part_text_set(cfdata->gui.o_selector, "e.text.selection", label);
974 if (label) E_FREE(label); 974 E_FREE(label);
975} 975}
976 976
977static void 977static void
@@ -994,7 +994,7 @@ _edge_grab_wnd_check_changed_cb(void *data, Evas_Object *obj __UNUSED__)
994 } 994 }
995 995
996 edje_object_part_text_set(cfdata->gui.o_selector, "e.text.selection", label); 996 edje_object_part_text_set(cfdata->gui.o_selector, "e.text.selection", label);
997 if (label) E_FREE(label); 997 E_FREE(label);
998} 998}
999 999
1000static void 1000static void
@@ -1078,7 +1078,7 @@ stop:
1078 cfdata->locals.click ? (-1.0 * cfdata->locals.button) : ((float)cfdata->locals.delay), 1078 cfdata->locals.click ? (-1.0 * cfdata->locals.button) : ((float)cfdata->locals.delay),
1079 cfdata->locals.modifiers); 1079 cfdata->locals.modifiers);
1080 edje_object_part_text_set(cfdata->gui.o_selector, "e.text.selection", label); 1080 edje_object_part_text_set(cfdata->gui.o_selector, "e.text.selection", label);
1081 if (label) E_FREE(label); 1081 E_FREE(label);
1082} 1082}
1083 1083
1084static void 1084static void
diff --git a/src/modules/conf_keybindings/e_int_config_keybindings.c b/src/modules/conf_keybindings/e_int_config_keybindings.c
index 47f08c301..bb9dc9fcf 100644
--- a/src/modules/conf_keybindings/e_int_config_keybindings.c
+++ b/src/modules/conf_keybindings/e_int_config_keybindings.c
@@ -175,8 +175,8 @@ _free_data(E_Config_Dialog *cfd __UNUSED__,
175 eina_stringshare_del(cfdata->locals.binding); 175 eina_stringshare_del(cfdata->locals.binding);
176 eina_stringshare_del(cfdata->locals.action); 176 eina_stringshare_del(cfdata->locals.action);
177 177
178 if (cfdata->locals.params) free(cfdata->locals.params); 178 free(cfdata->locals.params);
179 if (cfdata->params) free(cfdata->params); 179 free(cfdata->params);
180 E_FREE(cfdata); 180 E_FREE(cfdata);
181} 181}
182 182
@@ -785,7 +785,7 @@ _update_action_list(E_Config_Dialog_Data *cfdata)
785 else 785 else
786 { 786 {
787 e_widget_ilist_unselect(cfdata->gui.o_action_list); 787 e_widget_ilist_unselect(cfdata->gui.o_action_list);
788 if (cfdata->locals.action) free(cfdata->locals.action); 788 free(cfdata->locals.action);
789 cfdata->locals.action = strdup(""); 789 cfdata->locals.action = strdup("");
790 e_widget_entry_clear(cfdata->gui.o_params); 790 e_widget_entry_clear(cfdata->gui.o_params);
791 } 791 }
diff --git a/src/modules/conf_keybindings/e_int_config_mousebindings.c b/src/modules/conf_keybindings/e_int_config_mousebindings.c
index d409ed82a..ba0125df4 100644
--- a/src/modules/conf_keybindings/e_int_config_mousebindings.c
+++ b/src/modules/conf_keybindings/e_int_config_mousebindings.c
@@ -191,7 +191,7 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
191 eina_stringshare_del(cfdata->locals.action); 191 eina_stringshare_del(cfdata->locals.action);
192 eina_stringshare_del(cfdata->locals.cur); 192 eina_stringshare_del(cfdata->locals.cur);
193 193
194 if (cfdata->locals.params) free(cfdata->locals.params); 194 free(cfdata->locals.params);
195 E_FREE(cfdata); 195 E_FREE(cfdata);
196} 196}
197 197
@@ -756,8 +756,8 @@ _update_mouse_binding_list(E_Config_Dialog_Data *cfdata)
756 snprintf(label, sizeof(label), "%s + %s", button ? button : "", mods); 756 snprintf(label, sizeof(label), "%s + %s", button ? button : "", mods);
757 else 757 else
758 snprintf(label, sizeof(label), "%s", button ? button : ""); 758 snprintf(label, sizeof(label), "%s", button ? button : "");
759 if (button) free(button); 759 free(button);
760 if (mods) free(mods); 760 free(mods);
761 761
762 switch (eb->button) 762 switch (eb->button)
763 { 763 {
@@ -817,8 +817,8 @@ _update_mouse_binding_list(E_Config_Dialog_Data *cfdata)
817 snprintf(label, sizeof(label), "%s + %s", button ? button : "", mods); 817 snprintf(label, sizeof(label), "%s + %s", button ? button : "", mods);
818 else 818 else
819 snprintf(label, sizeof(label), "%s", button ? button : ""); 819 snprintf(label, sizeof(label), "%s", button ? button : "");
820 if (button) free(button); 820 free(button);
821 if (mods) free(mods); 821 free(mods);
822 822
823 snprintf(val, sizeof(val), "w%d", i); 823 snprintf(val, sizeof(val), "w%d", i);
824 824
diff --git a/src/modules/conf_menus/e_int_config_menus.c b/src/modules/conf_menus/e_int_config_menus.c
index 278ef5030..f00ce105d 100644
--- a/src/modules/conf_menus/e_int_config_menus.c
+++ b/src/modules/conf_menus/e_int_config_menus.c
@@ -233,8 +233,8 @@ _create_menus_list(Evas *evas, E_Config_Dialog_Data *cfdata)
233 } 233 }
234 } 234 }
235 e_widget_ilist_append(ob, NULL, label, NULL, NULL, file); 235 e_widget_ilist_append(ob, NULL, label, NULL, NULL, file);
236 if (tlabel) free(tlabel); 236 free(tlabel);
237 if (tdesc) free(tdesc); 237 free(tdesc);
238 free(file); 238 free(file);
239 i++; 239 i++;
240 } 240 }
diff --git a/src/modules/conf_paths/e_int_config_env.c b/src/modules/conf_paths/e_int_config_env.c
index 02db5b16c..803fc3803 100644
--- a/src/modules/conf_paths/e_int_config_env.c
+++ b/src/modules/conf_paths/e_int_config_env.c
@@ -77,8 +77,8 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
77 if (evr->val) eina_stringshare_del(evr->val); 77 if (evr->val) eina_stringshare_del(evr->val);
78 E_FREE(evr); 78 E_FREE(evr);
79 } 79 }
80 if (cfdata->var_str) free(cfdata->var_str); 80 free(cfdata->var_str);
81 if (cfdata->val_str) free(cfdata->val_str); 81 free(cfdata->val_str);
82 E_FREE(cfdata); 82 E_FREE(cfdata);
83} 83}
84 84
diff --git a/src/modules/conf_randr/e_smart_monitor.c b/src/modules/conf_randr/e_smart_monitor.c
index 60921cbb2..aab9a6d48 100644
--- a/src/modules/conf_randr/e_smart_monitor.c
+++ b/src/modules/conf_randr/e_smart_monitor.c
@@ -498,7 +498,7 @@ e_smart_monitor_changes_apply(Evas_Object *obj)
498 noutputs, mx, my, 498 noutputs, mx, my,
499 sd->current.mode->xid, 499 sd->current.mode->xid,
500 sd->current.orientation); 500 sd->current.orientation);
501 if (outputs) free(outputs); 501 free(outputs);
502 } 502 }
503 } 503 }
504 else 504 else
diff --git a/src/modules/conf_wallpaper2/e_int_config_wallpaper.c b/src/modules/conf_wallpaper2/e_int_config_wallpaper.c
index e83d0acd0..d146ce2a8 100644
--- a/src/modules/conf_wallpaper2/e_int_config_wallpaper.c
+++ b/src/modules/conf_wallpaper2/e_int_config_wallpaper.c
@@ -691,7 +691,7 @@ _pan_sel(Evas_Object *obj, Item *it)
691 if (it2->selected) it2->selected = 0; 691 if (it2->selected) it2->selected = 0;
692 } 692 }
693 it->selected = EINA_TRUE; 693 it->selected = EINA_TRUE;
694 if (sd->info->bg_file) free(sd->info->bg_file); 694 free(sd->info->bg_file);
695 evas_object_hide(sd->info->mini); 695 evas_object_hide(sd->info->mini);
696 if (it->file) 696 if (it->file)
697 { 697 {
@@ -710,7 +710,7 @@ _pan_sel(Evas_Object *obj, Item *it)
710 if (p) *p = 0; 710 if (p) *p = 0;
711 } 711 }
712 edje_object_part_text_set(sd->info->bg, "e.text.filename", name); 712 edje_object_part_text_set(sd->info->bg, "e.text.filename", name);
713 if (name) free(name); 713 free(name);
714 } 714 }
715 else 715 else
716 { 716 {
@@ -947,7 +947,7 @@ _pan_file_add(Evas_Object *obj, const char *file, Eina_Bool remote, Eina_Bool th
947 if (p) *p = 0; 947 if (p) *p = 0;
948 } 948 }
949 edje_object_part_text_set(sd->info->bg, "e.text.filename", name); 949 edje_object_part_text_set(sd->info->bg, "e.text.filename", name);
950 if (name) free(name); 950 free(name);
951 } 951 }
952 } 952 }
953 } 953 }
@@ -1074,8 +1074,7 @@ _idler(void *data)
1074 } 1074 }
1075 if (!eina_iterator_next(info->dir, (void**) &st)) 1075 if (!eina_iterator_next(info->dir, (void**) &st))
1076 { 1076 {
1077 free(info->curdir); 1077 E_FREE(info->curdir);
1078 info->curdir = NULL;
1079 eina_iterator_free(info->dir); 1078 eina_iterator_free(info->dir);
1080 info->dir = NULL; 1079 info->dir = NULL;
1081 info->idler = NULL; 1080 info->idler = NULL;
@@ -1108,7 +1107,7 @@ _scan(Info *info)
1108 edje_object_part_text_set(info->bg, "e.text.busy_label", 1107 edje_object_part_text_set(info->bg, "e.text.busy_label",
1109 _("Loading files...")); 1108 _("Loading files..."));
1110 } 1109 }
1111 if (info->curdir) free(info->curdir); 1110 free(info->curdir);
1112 info->curdir = info->dirs->data; 1111 info->curdir = info->dirs->data;
1113 info->dirs = eina_list_remove_list(info->dirs, info->dirs); 1112 info->dirs = eina_list_remove_list(info->dirs, info->dirs);
1114 if (!info->dir) info->dir = eina_file_stat_ls(info->curdir); 1113 if (!info->dir) info->dir = eina_file_stat_ls(info->curdir);
@@ -1162,8 +1161,7 @@ wp_browser_new(E_Container *con)
1162 win = e_win_new(con); 1161 win = e_win_new(con);
1163 if (!win) 1162 if (!win)
1164 { 1163 {
1165 free(info); 1164 E_FREE(info);
1166 info = NULL;
1167 return NULL; 1165 return NULL;
1168 } 1166 }
1169 info->win = win; 1167 info->win = win;
@@ -1328,8 +1326,7 @@ wp_broser_free(Info *info)
1328 free(s); 1326 free(s);
1329 if (info->idler) ecore_idler_del(info->idler); 1327 if (info->idler) ecore_idler_del(info->idler);
1330 // del other stuff 1328 // del other stuff
1331 free(info); 1329 E_FREE(info);
1332 info = NULL;
1333} 1330}
1334 1331
1335E_Config_Dialog * 1332E_Config_Dialog *
diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c
index 60bdf5d09..375d63533 100644
--- a/src/modules/cpufreq/e_mod_main.c
+++ b/src/modules/cpufreq/e_mod_main.c
@@ -550,7 +550,7 @@ _cpufreq_status_free(Status *s)
550 free(l->data); 550 free(l->data);
551 eina_list_free(s->governors); 551 eina_list_free(s->governors);
552 } 552 }
553 if (s->cur_governor) free(s->cur_governor); 553 free(s->cur_governor);
554 if (s->orig_governor) eina_stringshare_del(s->orig_governor); 554 if (s->orig_governor) eina_stringshare_del(s->orig_governor);
555 free(s); 555 free(s);
556} 556}
@@ -834,7 +834,7 @@ _cpufreq_status_check_current(Status *s)
834 { 834 {
835 ret = 1; 835 ret = 1;
836 836
837 if (s->cur_governor) free(s->cur_governor); 837 free(s->cur_governor);
838 s->cur_governor = strdup(buf); 838 s->cur_governor = strdup(buf);
839 839
840 for (i = strlen(s->cur_governor) - 1; i >= 0; i--) 840 for (i = strlen(s->cur_governor) - 1; i >= 0; i--)
diff --git a/src/modules/dropshadow/e_mod_main.c b/src/modules/dropshadow/e_mod_main.c
index edd7b63ba..d4bc3912d 100644
--- a/src/modules/dropshadow/e_mod_main.c
+++ b/src/modules/dropshadow/e_mod_main.c
@@ -212,8 +212,8 @@ _ds_shutdown(Dropshadow *ds)
212 _ds_shadow_del(sh); 212 _ds_shadow_del(sh);
213 } 213 }
214 if (ds->idler_before) e_main_idler_before_del(ds->idler_before); 214 if (ds->idler_before) e_main_idler_before_del(ds->idler_before);
215 if (ds->table.gauss) free(ds->table.gauss); 215 free(ds->table.gauss);
216 if (ds->table.gauss2) free(ds->table.gauss2); 216 free(ds->table.gauss2);
217 _ds_shared_free(ds); 217 _ds_shared_free(ds);
218 free(ds); 218 free(ds);
219} 219}
@@ -1083,7 +1083,7 @@ _ds_blur_init(Dropshadow *ds)
1083{ 1083{
1084 int i; 1084 int i;
1085 1085
1086 if (ds->table.gauss) free(ds->table.gauss); 1086 free(ds->table.gauss);
1087 ds->table.gauss_size = (ds->conf->blur_size * 2) - 1; 1087 ds->table.gauss_size = (ds->conf->blur_size * 2) - 1;
1088 ds->table.gauss = calloc(1, ds->table.gauss_size * sizeof(unsigned char)); 1088 ds->table.gauss = calloc(1, ds->table.gauss_size * sizeof(unsigned char));
1089 1089
@@ -1098,7 +1098,7 @@ _ds_blur_init(Dropshadow *ds)
1098 _ds_gauss_int(-1.5 + (v * 3.0)) * 255.0; 1098 _ds_gauss_int(-1.5 + (v * 3.0)) * 255.0;
1099 } 1099 }
1100 1100
1101 if (ds->table.gauss2) free(ds->table.gauss2); 1101 free(ds->table.gauss2);
1102 ds->table.gauss2_size = (ds->conf->blur_size * 2) - 1; 1102 ds->table.gauss2_size = (ds->conf->blur_size * 2) - 1;
1103 ds->table.gauss2 = calloc(1, ds->table.gauss2_size * sizeof(unsigned char)); 1103 ds->table.gauss2 = calloc(1, ds->table.gauss2_size * sizeof(unsigned char));
1104 1104
@@ -1484,7 +1484,7 @@ static void
1484_ds_shpix_free(Shpix *sp) 1484_ds_shpix_free(Shpix *sp)
1485{ 1485{
1486 if (!sp) return; 1486 if (!sp) return;
1487 if (sp->pix) free(sp->pix); 1487 free(sp->pix);
1488 free(sp); 1488 free(sp);
1489} 1489}
1490 1490
@@ -1968,8 +1968,7 @@ _tilebuf_intersect(int tsize, int tlen, int tnum, int x, int w, int *x1, int *x2
1968static void 1968static void
1969_tilebuf_setup(Tilebuf *tb) 1969_tilebuf_setup(Tilebuf *tb)
1970{ 1970{
1971 if (tb->tiles.tiles) free(tb->tiles.tiles); 1971 E_FREE(tb->tiles.tiles);
1972 tb->tiles.tiles = NULL;
1973 1972
1974 tb->tiles.w = (tb->outbuf_w + (tb->tile_size.w - 1)) / tb->tile_size.w; 1973 tb->tiles.w = (tb->outbuf_w + (tb->tile_size.w - 1)) / tb->tile_size.w;
1975 tb->tiles.h = (tb->outbuf_h + (tb->tile_size.h - 1)) / tb->tile_size.h; 1974 tb->tiles.h = (tb->outbuf_h + (tb->tile_size.h - 1)) / tb->tile_size.h;
@@ -2004,7 +2003,7 @@ _tilebuf_new(int w, int h)
2004static void 2003static void
2005_tilebuf_free(Tilebuf *tb) 2004_tilebuf_free(Tilebuf *tb)
2006{ 2005{
2007 if (tb->tiles.tiles) free(tb->tiles.tiles); 2006 free(tb->tiles.tiles);
2008 free(tb); 2007 free(tb);
2009} 2008}
2010 2009
diff --git a/src/modules/everything/evry_plug_apps.c b/src/modules/everything/evry_plug_apps.c
index 2a69ed79a..2f798c66d 100644
--- a/src/modules/everything/evry_plug_apps.c
+++ b/src/modules/everything/evry_plug_apps.c
@@ -1262,9 +1262,7 @@ _plugins_shutdown(void)
1262 1262
1263 _dir_monitor_free(); 1263 _dir_monitor_free();
1264 1264
1265 if (current_path) 1265 E_FREE(current_path);
1266 free(current_path);
1267 current_path = NULL;
1268} 1266}
1269 1267
1270/***************************************************************************/ 1268/***************************************************************************/
diff --git a/src/modules/illume-home/e_mod_main.c b/src/modules/illume-home/e_mod_main.c
index 7685eb1ef..c5468df01 100644
--- a/src/modules/illume-home/e_mod_main.c
+++ b/src/modules/illume-home/e_mod_main.c
@@ -356,7 +356,7 @@ _il_home_desktop_find_border(E_Zone *zone, Efreet_Desktop *desktop)
356 if (e_exec_startup_id_pid_find(bd->client.netwm.pid, 356 if (e_exec_startup_id_pid_find(bd->client.netwm.pid,
357 bd->client.netwm.startup_id) == desktop) 357 bd->client.netwm.startup_id) == desktop)
358 { 358 {
359 if (exe) free(exe); 359 free(exe);
360 return bd; 360 return bd;
361 } 361 }
362 if (exe) 362 if (exe)
@@ -381,7 +381,7 @@ _il_home_desktop_find_border(E_Zone *zone, Efreet_Desktop *desktop)
381 } 381 }
382 } 382 }
383 } 383 }
384 if (exe) free(exe); 384 free(exe);
385 return NULL; 385 return NULL;
386} 386}
387 387
diff --git a/src/modules/illume-keyboard/e_kbd_dict.c b/src/modules/illume-keyboard/e_kbd_dict.c
index eeb71a295..645fba37d 100644
--- a/src/modules/illume-keyboard/e_kbd_dict.c
+++ b/src/modules/illume-keyboard/e_kbd_dict.c
@@ -415,7 +415,7 @@ e_kbd_dict_save(E_Kbd_Dict *kd)
415 else 415 else
416 fprintf(f, "%s %i\n", wd, usage); 416 fprintf(f, "%s %i\n", wd, usage);
417 } 417 }
418 if (wd) free(wd); 418 free(wd);
419 p = pn; 419 p = pn;
420 if (p >= (kd->file.dict + kd->file.size)) break; 420 if (p >= (kd->file.dict + kd->file.size)) break;
421 } 421 }
@@ -585,7 +585,7 @@ e_kbd_dict_word_usage_adjust(E_Kbd_Dict *kd, const char *word, int adjust)
585 585
586 // FIXME: we need to find an EXACT line match - case and all 586 // FIXME: we need to find an EXACT line match - case and all
587 wd = _e_kbd_dict_line_parse(kd, line, &usage); 587 wd = _e_kbd_dict_line_parse(kd, line, &usage);
588 if (wd) free(wd); 588 free(wd);
589 } 589 }
590 usage += adjust; 590 usage += adjust;
591 _e_kbd_dict_changed_write_add(kd, word, usage); 591 _e_kbd_dict_changed_write_add(kd, word, usage);
diff --git a/src/modules/illume-keyboard/e_kbd_int.c b/src/modules/illume-keyboard/e_kbd_int.c
index 95c2e2722..842a2414e 100644
--- a/src/modules/illume-keyboard/e_kbd_int.c
+++ b/src/modules/illume-keyboard/e_kbd_int.c
@@ -124,9 +124,9 @@ _e_kbd_int_layout_buf_update(E_Kbd_Int *ki)
124 s3 = strdup(_e_kbd_int_str_unquote(out_capslock)); 124 s3 = strdup(_e_kbd_int_str_unquote(out_capslock));
125 e_kbd_buf_layout_key_add(ki->kbuf, s1, s2, s3, 125 e_kbd_buf_layout_key_add(ki->kbuf, s1, s2, s3,
126 ky->x, ky->y, ky->w, ky->h); 126 ky->x, ky->y, ky->w, ky->h);
127 if (s1) free(s1); 127 free(s1);
128 if (s2) free(s2); 128 free(s2);
129 if (s3) free(s3); 129 free(s3);
130 } 130 }
131 } 131 }
132} 132}
@@ -913,7 +913,7 @@ _e_kbd_int_layout_free(E_Kbd_Int *ki)
913{ 913{
914 E_Kbd_Int_Key *ky; 914 E_Kbd_Int_Key *ky;
915 915
916 if (ki->layout.directory) free(ki->layout.directory); 916 free(ki->layout.directory);
917 if (ki->layout.file) eina_stringshare_del(ki->layout.file); 917 if (ki->layout.file) eina_stringshare_del(ki->layout.file);
918 ki->layout.directory = NULL; 918 ki->layout.directory = NULL;
919 ki->layout.file = NULL; 919 ki->layout.file = NULL;
@@ -999,8 +999,7 @@ _e_kbd_int_layout_parse(E_Kbd_Int *ki, const char *layout)
999 if (!ky) continue; 999 if (!ky) continue;
1000 if (sscanf(buf, "%*s %i %i %i %i\n", &(ky->x), &(ky->orig_y), &(ky->w), &(ky->orig_h)) != 4) 1000 if (sscanf(buf, "%*s %i %i %i %i\n", &(ky->x), &(ky->orig_y), &(ky->w), &(ky->orig_h)) != 4)
1001 { 1001 {
1002 free(ky); 1002 E_FREE(ky);
1003 ky = NULL;
1004 continue; 1003 continue;
1005 } 1004 }
1006 ki->layout.keys = eina_list_append(ki->layout.keys, ky); 1005 ki->layout.keys = eina_list_append(ki->layout.keys, ky);
diff --git a/src/modules/illume2/e_mod_config_policy.c b/src/modules/illume2/e_mod_config_policy.c
index 62400c90b..cb65b131b 100644
--- a/src/modules/illume2/e_mod_config_policy.c
+++ b/src/modules/illume2/e_mod_config_policy.c
@@ -153,7 +153,7 @@ _e_mod_illume_config_policy_policies_get(void)
153 e_object_del(E_OBJECT(p)); 153 e_object_del(E_OBJECT(p));
154 continue; 154 continue;
155 } 155 }
156 if (file) free(file); 156 free(file);
157 l = eina_list_append(l, p); 157 l = eina_list_append(l, p);
158 } 158 }
159 159
diff --git a/src/modules/illume2/e_mod_policy.c b/src/modules/illume2/e_mod_policy.c
index 2e8e6cc96..70e038900 100644
--- a/src/modules/illume2/e_mod_policy.c
+++ b/src/modules/illume2/e_mod_policy.c
@@ -46,7 +46,7 @@ e_mod_policy_init(void)
46 { 46 {
47 /* loading policy failed, bail out */ 47 /* loading policy failed, bail out */
48 printf("Cannot load policy: %s\n", file); 48 printf("Cannot load policy: %s\n", file);
49 if (file) free(file); 49 free(file);
50 return 0; 50 return 0;
51 } 51 }
52 52
@@ -493,7 +493,7 @@ _e_mod_policy_cb_policy_change(void *data __UNUSED__, int type, void *event __UN
493 /* try to load the policy */ 493 /* try to load the policy */
494 _e_mod_policy_load(file); 494 _e_mod_policy_load(file);
495 495
496 if (file) free(file); 496 free(file);
497 497
498 return ECORE_CALLBACK_PASS_ON; 498 return ECORE_CALLBACK_PASS_ON;
499} 499}
diff --git a/src/modules/illume2/e_mod_select_window.c b/src/modules/illume2/e_mod_select_window.c
index 1b85f5682..49fb12f63 100644
--- a/src/modules/illume2/e_mod_select_window.c
+++ b/src/modules/illume2/e_mod_select_window.c
@@ -134,9 +134,9 @@ _e_mod_illume_config_select_window_list_changed(void *data)
134 break; 134 break;
135 } 135 }
136 136
137 if (title) free(title); 137 free(title);
138 if (name) free(name); 138 free(name);
139 if (class) free(class); 139 free(class);
140 140
141 if (_sw_change_timer) ecore_timer_del(_sw_change_timer); 141 if (_sw_change_timer) ecore_timer_del(_sw_change_timer);
142 _sw_change_timer = 142 _sw_change_timer =
@@ -235,9 +235,9 @@ _e_mod_illume_config_select_window_match(E_Border *bd)
235 break; 235 break;
236 } 236 }
237 237
238 if (title) free(title); 238 free(title);
239 if (name) free(name); 239 free(name);
240 if (class) free(class); 240 free(class);
241 241
242 return match; 242 return match;
243} 243}
diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c
index 9618ce2f8..800d782a4 100644
--- a/src/modules/shot/e_mod_main.c
+++ b/src/modules/shot/e_mod_main.c
@@ -484,7 +484,7 @@ _win_share_cb(void *data __UNUSED__, void *data2 __UNUSED__)
484 return; 484 return;
485 } 485 }
486 rewind(f); 486 rewind(f);
487 if (fdata) free(fdata); 487 free(fdata);
488 fdata = malloc(fsize); 488 fdata = malloc(fsize);
489 if (!fdata) 489 if (!fdata)
490 { 490 {