if (service->network != NULL)
__connman_network_disconnect(service->network);
- if (__connman_ipconfig_disable(service->ipconfig_ipv4) == 0) {
- connman_ipconfig_unref(service->ipconfig_ipv4);
- service->ipconfig_ipv4 = NULL;
- }
-
- if (__connman_ipconfig_disable(service->ipconfig_ipv6) == 0) {
- connman_ipconfig_unref(service->ipconfig_ipv6);
- service->ipconfig_ipv6 = NULL;
- }
+ __connman_ipconfig_disable(service->ipconfig_ipv4);
+ __connman_ipconfig_disable(service->ipconfig_ipv6);
__connman_stats_service_unregister(service);
if (err < 0) {
if (err != -EINPROGRESS) {
- if (__connman_ipconfig_disable(
- service->ipconfig_ipv4) == 0) {
- connman_ipconfig_unref(service->ipconfig_ipv4);
- service->ipconfig_ipv4 = NULL;
- }
-
- if (__connman_ipconfig_disable(
- service->ipconfig_ipv6) == 0) {
- connman_ipconfig_unref(service->ipconfig_ipv6);
- service->ipconfig_ipv6 = NULL;
- }
+ __connman_ipconfig_disable(service->ipconfig_ipv4);
+ __connman_ipconfig_disable(service->ipconfig_ipv6);
__connman_stats_service_unregister(service);
if (service->userconnect == TRUE)
__connman_ipconfig_clear_address(service->ipconfig_ipv4);
__connman_ipconfig_clear_address(service->ipconfig_ipv6);
- if (__connman_ipconfig_disable(service->ipconfig_ipv4) == 0) {
- connman_ipconfig_unref(service->ipconfig_ipv4);
- service->ipconfig_ipv4 = NULL;
- }
-
- if (__connman_ipconfig_disable(service->ipconfig_ipv6) == 0) {
- connman_ipconfig_unref(service->ipconfig_ipv6);
- service->ipconfig_ipv6 = NULL;
- }
+ __connman_ipconfig_disable(service->ipconfig_ipv4);
+ __connman_ipconfig_disable(service->ipconfig_ipv6);
__connman_stats_service_unregister(service);