From: jiyong.min Date: Tue, 21 Jul 2020 23:05:17 +0000 (+0900) Subject: Fix memory leak if 'latest_server_name' is empty string. X-Git-Tag: accepted/tizen/unified/20200723.161255~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F95%2F239095%2F3;p=platform%2Fcore%2Fapi%2Fmedia-controller.git Fix memory leak if 'latest_server_name' is empty string. Change-Id: I9f3af6da75af0d5c77efe2c3c7d7cd0e41aada74 --- diff --git a/svc/media_controller_svc.c b/svc/media_controller_svc.c index 6251b79..0172b85 100644 --- a/svc/media_controller_svc.c +++ b/svc/media_controller_svc.c @@ -319,9 +319,9 @@ static int __mc_service_reset_db(uid_t uid) res = mc_db_util_migration(db_handle, latest_server_name); if (res != MEDIA_CONTROLLER_ERROR_NONE) mc_error("mc_db_util_migration failed [%d]", res); - - g_free(latest_server_name); } + + g_free(latest_server_name); } /* tables recovery when some tables are removed */