Commit c0f4c2f2 authored by Ilya Shipitsin's avatar Ilya Shipitsin Committed by Beniamino Galvani

platform: silence cppcheck warning about NULL pointer dereference

found by cppcheck

[src/platform/nm-platform.c:4143] -> [src/platform/nm-platform.c:4141] -> [src/platform/nm-platform.c:3912] -> [src/platform/nm-platform.c:3884]: (warning) Null pointer dereference: addresses

[bgalvani@redhat.com: reworded commit message]

https://github.com/NetworkManager/NetworkManager/pull/353
parent cb4bd173
Pipeline #71289 passed with stages
in 77 minutes and 56 seconds
......@@ -4138,11 +4138,12 @@ nm_platform_ip4_address_sync (NMPlatform *self,
}
}
ip4_addr_subnets_destroy_index (plat_subnets, plat_addresses);
ip4_addr_subnets_destroy_index (known_subnets, known_addresses);
if (!known_addresses)
return TRUE;
ip4_addr_subnets_destroy_index (known_subnets, known_addresses);
ifa_flags = nm_platform_kernel_support_get (NM_PLATFORM_KERNEL_SUPPORT_TYPE_EXTENDED_IFA_FLAGS)
? IFA_F_NOPREFIXROUTE
: 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment