Fix memory leak 69/223769/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 4 Feb 2020 01:15:22 +0000 (10:15 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 4 Feb 2020 01:15:22 +0000 (10:15 +0900)
Change-Id: I8c29238d7630179e8b346a0664ac1e68145fc024
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
syspopup/syspopup_wayland.c

index 2fca593..7254c13 100644 (file)
@@ -121,6 +121,7 @@ int wl_syspopup_reset(bundle *b)
        syspopup *sp;
        Ecore_Wl2_Window *wl_win;
        efl_util_notification_level_e level;
+       int focus;
        int ret;
 
        popup_name = _syspopup_get_name_from_bundle(b);
@@ -144,20 +145,21 @@ int wl_syspopup_reset(bundle *b)
        wl_win = (Ecore_Wl2_Window *)sp->internal_data;
        ecore_wl2_window_type_set(wl_win, ECORE_WL2_WINDOW_TYPE_NOTIFICATION);
 
+       focus = info->focus;
        level = __wl_syspopup_get_notification_level(info->prio);
+       _syspopup_info_free(info);
+
        ret = efl_util_set_notification_window_level(sp->win, level);
        if (ret != EFL_UTIL_ERROR_NONE) {
                _E("Failed to set notification window level - %d", ret);
                return -1;
        }
 
-       if (info->focus)
+       if (focus)
                ecore_wl2_window_focus_skip_set(wl_win, EINA_TRUE);
 
        __wl_rotation_set(sp);
 
-       _syspopup_info_free(info);
-
        return 0;
 }