aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-21 10:20:05 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-21 10:20:05 +0000
commit3bc56a9e5ff62dc86958e88135b7d67a85640db5 (patch)
tree98e08e4cba349c3989034f5addd3ed82700b222d
parent27896bfae3eeb19b6fae781caf718db7ba70ea2c (diff)
downloadenlightenment-3bc56a9e5ff62dc86958e88135b7d67a85640db5.tar.gz
enlightenment-3bc56a9e5ff62dc86958e88135b7d67a85640db5.tar.xz
enlightenment-3bc56a9e5ff62dc86958e88135b7d67a85640db5.zip
fix a tremendous number of stringshare leaks
SVN revision: 81532
-rw-r--r--src/bin/e_bg.c4
-rw-r--r--src/bin/e_int_border_menu.c1
-rw-r--r--src/bin/e_int_menus.c1
-rw-r--r--src/bin/e_widget_deskpreview.c2
-rw-r--r--src/modules/conf_theme/e_int_config_scale.c1
-rw-r--r--src/modules/conf_theme/e_int_config_wallpaper.c5
-rw-r--r--src/modules/illume-home/e_mod_main.c2
-rw-r--r--src/modules/pager/e_mod_main.c1
-rw-r--r--src/modules/wizard/page_050.c1
9 files changed, 13 insertions, 5 deletions
diff --git a/src/bin/e_bg.c b/src/bin/e_bg.c
index 97d193e7b..13a05aa02 100644
--- a/src/bin/e_bg.c
+++ b/src/bin/e_bg.c
@@ -221,7 +221,7 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
const char *pfile = "";
edje_object_file_get(zone->bg_object, &pfile, NULL);
- if (!e_util_strcmp(pfile, bgfile)) return;
+ if (!e_util_strcmp(pfile, bgfile)) goto end;
}
if (transition == E_BG_TRANSITION_NONE)
@@ -296,6 +296,8 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
zone->bg_object);
edje_object_signal_emit(zone->transition_object, "e,action,start", "e");
}
+end:
+ eina_stringshare_del(bgfile);
}
EAPI void
diff --git a/src/bin/e_int_border_menu.c b/src/bin/e_int_border_menu.c
index d0b9cb46a..00632da6d 100644
--- a/src/bin/e_int_border_menu.c
+++ b/src/bin/e_int_border_menu.c
@@ -898,6 +898,7 @@ _e_border_menu_cb_sendto_icon_pre(void *data, E_Menu *m, E_Menu_Item *mi)
desk->x, desk->y);
o = e_thumb_icon_add(m->evas);
e_thumb_icon_file_set(o, bgfile, "e/desktop/background");
+ eina_stringshare_del(bgfile);
e_thumb_icon_size_set(o, tw, th);
e_thumb_icon_begin(o);
mi->icon_object = o;
diff --git a/src/bin/e_int_menus.c b/src/bin/e_int_menus.c
index abab4602d..29471fd92 100644
--- a/src/bin/e_int_menus.c
+++ b/src/bin/e_int_menus.c
@@ -994,6 +994,7 @@ _e_int_menus_virtuals_icon_cb(void *data, E_Menu *m, E_Menu_Item *mi)
bgfile = e_bg_file_get(desk->zone->container->num, desk->zone->num, desk->x, desk->y);
o = e_thumb_icon_add(m->evas);
e_thumb_icon_file_set(o, bgfile, "e/desktop/background");
+ eina_stringshare_del(bgfile);
e_thumb_icon_size_set(o, tw, th);
e_thumb_icon_begin(o);
mi->icon_object = o;
diff --git a/src/bin/e_widget_deskpreview.c b/src/bin/e_widget_deskpreview.c
index 8bab04831..a2e733fdf 100644
--- a/src/bin/e_widget_deskpreview.c
+++ b/src/bin/e_widget_deskpreview.c
@@ -84,6 +84,7 @@ e_widget_deskpreview_desk_add(Evas_Object *obj, E_Zone *zone, int x, int y, int
dd->thumb = e_icon_add(evas_object_evas_get(obj));
e_icon_fill_inside_set(dd->thumb, EINA_FALSE);
e_icon_file_edje_set(dd->thumb, bgfile, "e/desktop/background");
+ eina_stringshare_del(bgfile);
evas_object_show(dd->thumb);
edje_object_part_swallow(dd->icon, "e.swallow.content", dd->thumb);
@@ -265,6 +266,7 @@ _e_wid_cb_bg_update(void *data, int type, void *event)
bgfile = e_bg_file_get(dd->con, dd->zone, dd->x, dd->y);
e_icon_file_edje_set(dd->thumb, bgfile, "e/desktop/background");
+ eina_stringshare_del(bgfile);
}
return ECORE_CALLBACK_PASS_ON;
diff --git a/src/modules/conf_theme/e_int_config_scale.c b/src/modules/conf_theme/e_int_config_scale.c
index 049285d8a..2b0aa843c 100644
--- a/src/modules/conf_theme/e_int_config_scale.c
+++ b/src/modules/conf_theme/e_int_config_scale.c
@@ -100,6 +100,7 @@ _scale_preview_new(E_Config_Dialog_Data *cfdata, Evas *e, double sc, double *scp
bg = edje_object_add(e_widget_preview_evas_get(ob));
file = e_bg_file_get(0, 0, 0, 0);
edje_object_file_set(bg, file, "e/desktop/background");
+ eina_stringshare_del(file);
evas_object_move(bg, 0, 0);
evas_object_resize(bg, 640, 480);
evas_object_show(bg);
diff --git a/src/modules/conf_theme/e_int_config_wallpaper.c b/src/modules/conf_theme/e_int_config_wallpaper.c
index 518b74d71..3ace5a474 100644
--- a/src/modules/conf_theme/e_int_config_wallpaper.c
+++ b/src/modules/conf_theme/e_int_config_wallpaper.c
@@ -332,11 +332,8 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cw = cfdata->cfd->data;
if (cw->specific_config)
{
- const char *bg;
-
/* specific config passed in. set for that only */
- bg = e_bg_file_get(cw->con_num, cw->zone_num, cw->desk_x, cw->desk_y);
- if (bg) cfdata->bg = eina_stringshare_add(bg);
+ cfdata->bg = e_bg_file_get(cw->con_num, cw->zone_num, cw->desk_x, cw->desk_y);
}
else
{
diff --git a/src/modules/illume-home/e_mod_main.c b/src/modules/illume-home/e_mod_main.c
index a3c6a7c9c..7685eb1ef 100644
--- a/src/modules/illume-home/e_mod_main.c
+++ b/src/modules/illume-home/e_mod_main.c
@@ -423,6 +423,7 @@ _il_home_win_new(E_Zone *zone)
hwin->o_bg = edje_object_add(evas);
edje_object_file_set(hwin->o_bg, bgfile, "e/desktop/background");
+ eina_stringshare_del(bgfile);
evas_object_move(hwin->o_bg, 0, 0);
evas_object_show(hwin->o_bg);
@@ -750,6 +751,7 @@ _il_home_cb_bg_change(void *data __UNUSED__, int type, void *event __UNUSED__)
else
bgfile = e_bg_file_get(zone->container->num, zone->num, -1, -1);
edje_object_file_set(hwin->o_bg, bgfile, "e/desktop/background");
+ eina_stringshare_del(bgfile);
}
return ECORE_CALLBACK_PASS_ON;
diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c
index 757446e18..f86273bfe 100644
--- a/src/modules/pager/e_mod_main.c
+++ b/src/modules/pager/e_mod_main.c
@@ -403,6 +403,7 @@ _pager_desk_livethumb_setup(Pager_Desk *pd)
bgfile = e_bg_file_get(pd->desk->zone->container->num, pd->desk->zone->num, pd->desk->x, pd->desk->y);
edje_object_file_set(o, bgfile, "e/desktop/background");
e_livethumb_thumb_set(pd->o_bg, o);
+ eina_stringshare_del(bgfile);
}
static Pager_Desk *
diff --git a/src/modules/wizard/page_050.c b/src/modules/wizard/page_050.c
index bbe38d17b..e16bad61e 100644
--- a/src/modules/wizard/page_050.c
+++ b/src/modules/wizard/page_050.c
@@ -65,6 +65,7 @@ _scale_preview_new(Evas *e, double sc, double *scp)
bg = edje_object_add(e_widget_preview_evas_get(ob));
file = e_bg_file_get(0, 0, 0, 0);
edje_object_file_set(bg, file, "e/desktop/background");
+ eina_stringshare_del(file);
evas_object_move(bg, 0, 0);
evas_object_resize(bg, 640, 480);
evas_object_show(bg);