From f696af78d16d62f4f1d234f323a4e6d1d84b0ad4 Mon Sep 17 00:00:00 2001 From: WooHyun Jung Date: Wed, 9 Jan 2013 12:43:51 +0000 Subject: [PATCH] elementary/elm_index : Freed pointer should not be returned. SVN revision: 82458 --- legacy/elementary/src/lib/elm_index.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/legacy/elementary/src/lib/elm_index.c b/legacy/elementary/src/lib/elm_index.c index 0d99c00..5b40b78 100644 --- a/legacy/elementary/src/lib/elm_index.c +++ b/legacy/elementary/src/lib/elm_index.c @@ -1259,11 +1259,15 @@ _item_sorted_insert(Eo *obj, void *_pd, va_list *list) p_it->base.data = it->base.data; _item_free(it); elm_widget_item_del(it); + it = NULL; } } _index_box_clear(obj, sd->bx[sd->level], sd->level); - *ret = (Elm_Object_Item *)it; + if (!it) + *ret = NULL; + else + *ret = (Elm_Object_Item *)it; } EAPI Elm_Object_Item * -- 2.7.4