From: DoHyun Pyun Date: Wed, 16 Sep 2020 22:53:42 +0000 (+0900) Subject: Fix the coverity issues X-Git-Tag: accepted/tizen/6.0/unified/20201030.120343^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_6.0_hotfix;p=platform%2Fcore%2Fconnectivity%2Fbt-syspopup.git Fix the coverity issues Change-Id: I4c605d1322fd5b9416de6bb0004add4be1723588 Signed-off-by: DoHyun Pyun --- diff --git a/src/bt-syspopup-m.c b/src/bt-syspopup-m.c index 7e5255b..6bd8d1c 100644 --- a/src/bt-syspopup-m.c +++ b/src/bt-syspopup-m.c @@ -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[]) diff --git a/src/bt-syspopup-w.c b/src/bt-syspopup-w.c index e95a353..dfcf7bf 100644 --- a/src/bt-syspopup-w.c +++ b/src/bt-syspopup-w.c @@ -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; }