Fix SVACE issues: 175412, 176047 39/115039/1 accepted/tizen/3.0/common/20170220.125612 accepted/tizen/3.0/ivi/20170220.013429 accepted/tizen/3.0/mobile/20170220.013208 accepted/tizen/3.0/tv/20170220.013249 accepted/tizen/3.0/wearable/20170220.013343 submit/tizen_3.0/20170216.103037
authorAtul Rai <a.rai@samsung.com>
Thu, 16 Feb 2017 06:43:13 +0000 (12:13 +0530)
committerAtul Rai <a.rai@samsung.com>
Thu, 16 Feb 2017 06:43:13 +0000 (12:13 +0530)
Change-Id: I253992e4db8103b0b93856d375b33144a34c739f
Signed-off-by: Atul Rai <a.rai@samsung.com>
src/bluetooth-common.c
src/bluetooth-tds.c

index df83e97880de42a91b6f3710f27b163ec35a7242..fead536ef1df3946f9c8ed4051f5bf079cdfb23b 100644 (file)
@@ -3610,10 +3610,11 @@ int _bt_gatt_client_update_all(bt_gatt_client_h client)
        }
        g_strfreev(prim_svc->handle);
 
-       g_free(prim_svc);
 
-       if (svc_list == NULL)
+       if (svc_list == NULL) {
+               g_free(prim_svc);
                return BT_ERROR_OPERATION_FAILED;
+       }
 
 done:
        g_slist_free_full(client_s->services,
index 5445053a0bef66cf3c3a33f88cf146a30d5f45ce..751680d98705658b64dd4a8a2f9dd5c1d2007c5e 100644 (file)
@@ -634,7 +634,7 @@ int _bt_tds_parse_transport_blocks(bt_tds_transport_block_list_s **info,
        }
 
        if (info_list != NULL) {
-               (*info)->data = (tds_transport_data_s**)g_malloc0(g_slist_length(info_list) * sizeof(tds_transport_data_s));
+               (*info)->data = (tds_transport_data_s **)g_malloc0(g_slist_length(info_list) * sizeof(tds_transport_data_s *));
                for (l = info_list, k = 0; l; l = g_slist_next(l), k++)
                        (*info)->data[k] = (tds_transport_data_s*)l->data;
                return BT_ERROR_NONE;