summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-netlink/local-addresses.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-netlink/local-addresses.c')
-rw-r--r--src/libsystemd/sd-netlink/local-addresses.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsystemd/sd-netlink/local-addresses.c b/src/libsystemd/sd-netlink/local-addresses.c
index 6abd8fd0cc..ed9ee041ab 100644
--- a/src/libsystemd/sd-netlink/local-addresses.c
+++ b/src/libsystemd/sd-netlink/local-addresses.c
@@ -155,8 +155,7 @@ int local_addresses(sd_netlink *context, int ifindex, int af, struct local_addre
n_list++;
};
- if (n_list > 0)
- qsort(list, n_list, sizeof(struct local_address), address_compare);
+ qsort_safe(list, n_list, sizeof(struct local_address), address_compare);
*ret = list;
list = NULL;