From 7157a6b43ce1fdebe705af7a26d9d36bfe4d7e2a Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Mon, 26 Mar 2018 10:57:04 +0900 Subject: [PATCH] Remove the duplicated local variable - No need to copy 'appId' from 'id'. - Changed to use 'appId' directly and free its memory. Change-Id: I36a8464ffb16b0a3e93592595bcf2cdb2e647a12 Signed-off-by: Seoyeon Kim --- dali/internal/adaptor/tizen/adaptor-impl-tizen.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dali/internal/adaptor/tizen/adaptor-impl-tizen.cpp b/dali/internal/adaptor/tizen/adaptor-impl-tizen.cpp index 1dfd267..35dbcea 100644 --- a/dali/internal/adaptor/tizen/adaptor-impl-tizen.cpp +++ b/dali/internal/adaptor/tizen/adaptor-impl-tizen.cpp @@ -101,16 +101,14 @@ void Adaptor::SurfaceInitialized() return; } char *appId; - char *id; - app_get_id(&id); + app_get_id(&appId); // Use strdup() in app_get_id(), so need to free memory - if( id ) + if( appId ) { - appId = id; Ecore_Wl_Window* ecoreWlWindow = AnyCast( mNativeWindow ); screen_connector_provider_remote_enable(appId, ecore_wl_window_surface_get(ecoreWlWindow)); - free( id ); + free( appId ); } #endif } -- 2.7.4