strncpy(addr[i], copied, sizeof(addr[i]) - 1);
addr[i][(int)(sizeof(addr[i]) - 1)] = '\0';
} else {
- strncpy(addr[i], copied, strlen(copied));
- addr[i][(int)strlen(copied)] = '\0';
+ strncpy(addr[i], copied, sizeof(addr[i]));
}
BT_DBG("copied/ptr (%s/%s)", copied, ptr);
__bt_ipsp_execute_dhcp6_server();
+ if (net_connection) {
+ connection_destroy(net_connection);
+ net_connection = NULL;
+ }
} else if (g_strcmp0(method_name, "SetIpv6Addr") == 0) {
int ret;
BT_DBG("");
g_free(network_ipv6_address);
g_free(remote_ipv6_address);
g_free(network_interface);
+ g_free(ifname);
+ g_free(address);
}
BT_DBG("-");