Correct AppId duplication 24/232224/1 accepted/tizen/5.5/unified/20200430.133049 submit/tizen_5.5/20200429.065847
authorDewal Agarwal <d1.agarwal@samsung.com>
Wed, 29 Apr 2020 06:34:08 +0000 (12:04 +0530)
committerDewal Agarwal <d1.agarwal@samsung.com>
Wed, 29 Apr 2020 06:34:08 +0000 (12:04 +0530)
Change-Id: I8218a4af0436d2ba1743d321a647a0eef8859a2f
Signed-off-by: Dewal Agarwal <d1.agarwal@samsung.com>
src/bm_power_engine.c

index 0a4e6ac..b711542 100644 (file)
@@ -296,6 +296,7 @@ static int bm_appid_session_usage_map(char *app_id, int app_usage, bm_plugin_id_
                _DBG("update - app_usage for app_id(%s), for resource(%d), by usage(%d)", app_id, resource_id, app_usage);
                //_DBG("session usage bt %d, wifi %d, cpu %d, dsp %d, dn %d", temp->rId_ble, temp->rId_wifi, temp->rId_cpu,
                //temp->rId_display, temp->rId_device_network);
+               g_free(app_id);
        } else {
                appid_usage_s *temp = (appid_usage_s *)calloc(1, sizeof(appid_usage_s));
                if (temp == NULL) {
@@ -310,7 +311,7 @@ static int bm_appid_session_usage_map(char *app_id, int app_usage, bm_plugin_id_
                else if (resource_id == BM_PLUGIN_ID_CPU)
                        temp->rId_cpu = app_usage;
                else if (resource_id == BM_PLUGIN_ID_DISPLAY)
-               temp->rId_display = app_usage;
+                       temp->rId_display = app_usage;
                else if (resource_id == BM_PLUGIN_ID_DEVICE_NETWORK)
                        temp->rId_device_network = app_usage;
 #ifdef DISABLE_FEATURE_DATA_FROM_GPS_HRM_PLUGIN