elm_win: null out freed data on smart del 39/80339/2
authorJaeun Choi <jaeun12.choi@samsung.com>
Sun, 17 Jul 2016 03:07:22 +0000 (12:07 +0900)
committerJaeun Choi <jaeun12.choi@samsung.com>
Sun, 17 Jul 2016 03:55:34 +0000 (20:55 -0700)
this fixes double-frees of strings in oddball cases where a deleted
window that is not done deleting is accessed.

Change-Id: I40e308d5b43b013134859ac5ca3a82018af5e48a
Signed-off-by: Jaeun Choi <jaeun12.choi@samsung.com>
Origin: upstream

src/lib/elm_win.c

index b0da8e1fa4df9f5b23d84cf689a73c136f906df7..187531eec6cc801df1b440581f94e2cf22d98a85 100644 (file)
@@ -2217,10 +2217,19 @@ _elm_win_evas_object_smart_del(Eo *obj, Elm_Win_Data *sd)
    evas_object_del(sd->icon);
    evas_object_del(sd->main_menu);
 
+   sd->focus_highlight.style = NULL;
+   sd->title = NULL;
+   sd->icon_name = NULL;
+   sd->role = NULL;
+   sd->name = NULL;
+   sd->icon = NULL;
+   sd->main_menu = NULL;
+
    _elm_win_profile_del(sd);
    _elm_win_available_profiles_del(sd);
 
    free(sd->wm_rot.rots);
+   sd->wm_rot.rots = NULL;
 
    /* Don't let callback in the air that point to sd */
    ecore_evas_callback_delete_request_set(sd->ee, NULL);