From: Atul Rai Date: Tue, 18 Jun 2019 10:33:39 +0000 (+0530) Subject: Fixed memory leak in _uam_core_deinit() X-Git-Tag: accepted/tizen/unified/20190702.234158~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6467f2523953fd5942d4104eae6725b272d0ea2d;p=platform%2Fcore%2Fconnectivity%2Fua-manager.git Fixed memory leak in _uam_core_deinit() Change-Id: I841122907ab0b3d93e02697b8d44d085cded819f Signed-off-by: Atul Rai --- diff --git a/ua-daemon/src/ua-manager-core.c b/ua-daemon/src/ua-manager-core.c index e9b6877..bee54c5 100644 --- a/ua-daemon/src/ua-manager-core.c +++ b/ua-daemon/src/ua-manager-core.c @@ -1985,6 +1985,19 @@ void _uam_core_deinit(void) g_slist_free(users); users = NULL; + /* Release allocated memory for services */ + for (l = services; NULL != l; l = g_slist_next(l)) { + uam_db_service_info_t *service = l->data; + + if (!service) + continue; + + g_free(service->name); + g_free(service); + } + g_slist_free(services); + services = NULL; + FUNC_EXIT; }