From 542542e4da0e2110de23d6df3325176046e8a98b Mon Sep 17 00:00:00 2001 From: Rajeev Ranjan Date: Tue, 9 Apr 2013 12:56:25 +0530 Subject: [PATCH] [elc_naviframe.c, elm_datetime.c, elm_gengrid.c] Fixed memory leak, dereferencing without initializing issue along with warnings. Change-Id: I44080e473d0600d363e54fd01bf8b88554d8bd1e --- src/lib/elc_naviframe.c | 2 +- src/lib/elm_datetime.c | 2 +- src/lib/elm_gengrid.c | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c index 3a58150..fe37776 100644 --- a/src/lib/elc_naviframe.c +++ b/src/lib/elc_naviframe.c @@ -913,7 +913,7 @@ _elm_naviframe_smart_signal_callback_add(Evas_Object *obj, _elm_naviframe_parent_sc->callback_add(obj, emission, source, func_cb, data); it = elm_naviframe_top_item_get(obj); - if (!it) return EINA_FALSE; + if (!it) return; elm_object_signal_callback_add(VIEW(it), emission, source, func_cb, data); } diff --git a/src/lib/elm_datetime.c b/src/lib/elm_datetime.c index ba01942..b6e68f5 100644 --- a/src/lib/elm_datetime.c +++ b/src/lib/elm_datetime.c @@ -281,7 +281,7 @@ _parse_format(Evas_Object *obj, } // ignore the set of chars (global, field specific) as field separators if (sep_parsing && - (len < MAX_SEPARATOR_LEN - 1) && + (len < MAX_SEPARATOR_LEN - 1) && field && (field->type != ELM_DATETIME_AMPM) && (!strchr(ignore_separators, cur)) && (!strchr(mapping[idx].ignore_sep, cur))) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 1449b09..3c70169 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -3779,7 +3779,11 @@ _elm_gengrid_proxy_item_new(const Elm_Object_Item *item) pi->proxy = evas_object_image_filled_add (evas_object_evas_get(ELM_WIDGET_DATA(GG_IT(it)->wsd)->obj)); - if (!pi->proxy) return EINA_FALSE; + if (!pi->proxy) + { + free(pi); + return NULL; + } evas_object_clip_set(pi->proxy, evas_object_clip_get(GG_IT(it)->wsd->pan_obj)); evas_object_smart_member_add(pi->proxy, GG_IT(it)->wsd->pan_obj); evas_object_hide(pi->proxy); -- 2.7.4