mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-18 21:20:40 +02:00
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
This commit is contained in:
parent
cb4bd173eb
commit
c0f4c2f2e6
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue