[genlist] fix dangling pointer in sorted insert state 73/80673/1
authorSangHyeon Lee <sh10233.lee@samsung.com>
Tue, 19 Jul 2016 10:48:27 +0000 (19:48 +0900)
committerSangHyeon Lee <sh10233.lee@samsung.com>
Tue, 19 Jul 2016 10:48:37 +0000 (19:48 +0900)
Change-Id: I6dc391816a824321537307fe369bcdc1780ad055
Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
src/mobile_lib/elm_genlist.c

index 30c7aaf..d7a5b1f 100644 (file)
@@ -5698,7 +5698,7 @@ _item_free(Elm_Gen_Item *it)
 
    if ((sd->g_item) && (sd->g_item == it)) sd->g_item = NULL;
    if (sd->expanded_item == it) sd->expanded_item = NULL;
-   if (sd->state) eina_inlist_sorted_state_free(sd->state);
+   if (sd->state) ELM_SAFE_FREE(sd->state, eina_inlist_sorted_state_free);
 
    if (sd->last_selected_item == EO_OBJ(it))
      sd->last_selected_item = NULL;