diff options
Diffstat (limited to 'src/nss-myhostname/netlink.c')
-rw-r--r-- | src/nss-myhostname/netlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nss-myhostname/netlink.c b/src/nss-myhostname/netlink.c index b1ef912c8a..47a41f55e6 100644 --- a/src/nss-myhostname/netlink.c +++ b/src/nss-myhostname/netlink.c @@ -197,7 +197,8 @@ finish: return r; } - qsort(list, n_list, sizeof(struct address), address_compare); + if (n_list) + qsort(list, n_list, sizeof(struct address), address_compare); *_list = list; *_n_list = n_list; |