Fix : Memory leak for 'app_context' 36/286036/1 accepted/tizen/unified/20230104.172215
authorDewal Agarwal <d1.agarwal@samsung.com>
Mon, 26 Dec 2022 13:32:37 +0000 (19:02 +0530)
committerDewal Agarwal <d1.agarwal@samsung.com>
Mon, 26 Dec 2022 13:32:37 +0000 (19:02 +0530)
- Coverity CID : 1281674

Change-Id: Ie18eb7ec90005079c26bbe7d98019e47c6398af6
Signed-off-by: Dewal Agarwal <d1.agarwal@samsung.com>
packaging/sync-manager.spec
src/sync-service/SyncManager_SyncService.cpp

index eabb55dac389c192de0c396d35d059a5644a9cbc..ddae660b8f2b6ef4431dad56577059dc6042762c 100644 (file)
@@ -2,7 +2,7 @@
 %global __provides_exclude_from ^.*\\.extension-calendar
 
 Name:      sync-service
-Version:   0.3.42
+Version:   0.3.43
 Release:   1
 License:   Apache-2.0
 Summary:   Sync manager daemon
index 2ac2f8e937c2203634e561b8aba551ca89510373..508c57c670824b2e443865c1120529f27c42dcfb 100644 (file)
@@ -392,6 +392,7 @@ SyncService::TriggerStartSync(const char* appId, int uid, int accountId, const c
                                SYNC_LOGE_RET_RES(ret == APP_MANAGER_ERROR_NONE, SYNC_ERROR_SYSTEM, "getting app_context is failed");
 
                                ret = app_context_get_pid(app_context, &pid);
+                               SYNC_LOG_IF((0 != app_context_destroy(app_context)), "app_context_destroy() failed");
                                SYNC_LOGE_RET_RES(ret == APP_MANAGER_ERROR_NONE, SYNC_ERROR_SYSTEM, "getting pid from app_context is failed");
 
                                snprintf(object_path, sizeof(object_path) - 1, "%s/%d", SYNC_ADAPTER_DBUS_PATH, pid);