elementary/elm_index : Freed pointer should not be returned.
authorWooHyun Jung <woohyun0705@gmail.com>
Wed, 9 Jan 2013 12:43:51 +0000 (12:43 +0000)
committerWooHyun Jung <woohyun0705@gmail.com>
Wed, 9 Jan 2013 12:43:51 +0000 (12:43 +0000)
SVN revision: 82458

src/lib/elm_index.c

index 0d99c00..5b40b78 100644 (file)
@@ -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 *