From 033762a53b47a2d511eb1ccb096ecf31dae9ec36 Mon Sep 17 00:00:00 2001 From: Atul Rai Date: Fri, 10 Feb 2017 14:36:34 +0530 Subject: [PATCH] Fixed SVACE issues (Id: 11726 168836 171554) Change-Id: Ica158320e62df31cdcc085d373ea5ffd8a3601b3 --- src/bluetooth-common.c | 1 + test/bt_unit_test.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index f17bb6a..df83e97 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -3620,6 +3620,7 @@ done: bt_gatt_client_handle_destroy); client_s->services = svc_list; + g_free(prim_svc); return BT_ERROR_NONE; } diff --git a/test/bt_unit_test.c b/test/bt_unit_test.c index dffe4c5..48c3641 100644 --- a/test/bt_unit_test.c +++ b/test/bt_unit_test.c @@ -2452,9 +2452,6 @@ bool __bt_hps_client_svc_cb(int total, index, total, str ? str : "Unknown", uuid); - g_free(str); - g_free(uuid); - if (test_id == BT_UNIT_TEST_FUNCTION_HPS_CLIENT_PRINT_ALL) { #ifdef ARCH64 ret = bt_gatt_service_foreach_characteristics(svc_handle, @@ -2469,6 +2466,9 @@ bool __bt_hps_client_svc_cb(int total, TC_PRT("bt_gatt_service_foreach_characteristics is failed : %d", ret); } } + + g_free(str); + g_free(uuid); return true; } @@ -2739,6 +2739,7 @@ bool __bt_gatt_included_service_cb(bt_gatt_attribute_h service, bt_get_uuid_name(uuid, &name); TC_PRT("uuid: %s [%s]", uuid, name); + g_free(value); g_free(uuid); g_free(name); return true; -- 2.34.1