Fix the coverity issues 83/244283/1 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix accepted/tizen_6.5_unified accepted/tizen_7.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix tizen_6.5 tizen_7.0_hotfix accepted/tizen/6.0/unified/20201030.120343 accepted/tizen/6.0/unified/hotfix/20201103.050628 accepted/tizen/6.5/unified/20211028.100106 accepted/tizen/7.0/unified/20221110.062051 accepted/tizen/7.0/unified/hotfix/20221116.105148 accepted/tizen/unified/20200917.222754 accepted/tizen/unified/20200923.093727 submit/tizen/20200917.074943 submit/tizen/20200917.075044 submit/tizen/20200923.005759 submit/tizen_6.0/20201029.205103 submit/tizen_6.0_hotfix/20201102.192503 submit/tizen_6.0_hotfix/20201103.114803 submit/tizen_6.5/20211028.162201 tizen_6.0.m2_release tizen_6.5.m2_release tizen_7.0_m2_release
authorDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 16 Sep 2020 22:53:42 +0000 (07:53 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 16 Sep 2020 22:53:42 +0000 (07:53 +0900)
Change-Id: I4c605d1322fd5b9416de6bb0004add4be1723588
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/bt-syspopup-m.c
src/bt-syspopup-w.c

index 7e5255b..6bd8d1c 100644 (file)
@@ -2751,6 +2751,9 @@ static void __bluetooth_reset(app_control_h app_control, void *data)
 
 release:
        bundle_free(b);
+
+       if (operation)
+               free(operation);
 }
 
 EXPORT int main(int argc, char *argv[])
index e95a353..dfcf7bf 100644 (file)
@@ -2209,8 +2209,16 @@ static int __bluetooth_reset_sub(app_control_h app_control, struct bt_popup_appd
                ad->event_type = BT_EVENT_ENABLE_REQUEST;
        } else {
                BT_ERR("Abnormal app control operation!");
+
+               if (operation)
+                       free(operation);
+
                return -1;
        }
+
+       if (operation)
+               free(operation);
+
        return 0;
 }