Fix the coverity issues
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / bluez_hal / src / bt-hal-gatt-server.c
index 3b267f1..26d15c8 100644 (file)
@@ -2327,6 +2327,8 @@ static int __bt_hal_gatt_init(void)
                owner_id = g_bus_own_name_on_connection(g_conn, name,
                                        G_BUS_NAME_OWNER_FLAGS_NONE,
                                        NULL, NULL, NULL, NULL);
+
+               g_free(name);
        }
        INFO("Owner ID [%d]", owner_id);
 
@@ -3376,6 +3378,8 @@ static bt_status_t gatt_server_update_att_value(int server_if, int attribute_han
        }
 
        g_free(serv_path);
+       g_strfreev(line_argv);
+
        line_argv = g_strsplit_set(char_path, "/", 0);
        serv_path = g_strdup_printf("/%s/%s/%s", line_argv[1], line_argv[2], line_argv[3]);