Fix mem leak issue when video rendering is not supported 56/192856/2
authorJaechan Lee <jaechan3.lee@samsung.com>
Mon, 12 Nov 2018 04:58:10 +0000 (13:58 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Mon, 12 Nov 2018 07:22:25 +0000 (16:22 +0900)
Change-Id: I1007663c58097ae1f6d4e6b388500dcad44d3af9
Signed-off-by: Jaechan Lee <jaechan3.lee@samsung.com>
src/player.c

index f38da0e..f20bb27 100644 (file)
@@ -2049,15 +2049,15 @@ int player_destroy(player_h player)
        _player_release_internal_memory(pc, true);
 
 #ifdef TIZEN_FEATURE_EVAS_RENDERER
-       if (CALLBACK_INFO(pc) && EVAS_INFO(pc)->support_video) {
-               if (EVAS_HANDLE(pc)) {
+       if (CALLBACK_INFO(pc) && EVAS_INFO(pc)) {
+               if (EVAS_INFO(pc)->support_video && EVAS_HANDLE(pc)) {
                        player_unset_media_packet_video_frame_decoded_cb(player);
                        PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_destroy_evas_display, "disp_destroy_evas_display");
                        if (p_disp_destroy_evas_display(&EVAS_HANDLE(pc)) != MM_ERROR_NONE)
                                LOGW("fail to unset evas client");
                        __player_unset_retrieve_buffer_cb(player);
-                       g_free(pc->cb_info->evas_info);
                }
+               g_free(EVAS_INFO(pc));
        }
 #endif