From: Thomas Hindoe Paaboel Andersen Date: Sat, 16 Aug 2014 21:18:32 +0000 (+0200) Subject: networkctl: use safe_qsort in case no links are present X-Git-Tag: v216~61^2~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a6a4f528899b1dab47408733b4a423c66ea40f7a;p=elogind.git networkctl: use safe_qsort in case no links are present Unlikely to happen but still... --- diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 6253cbf58..2a7a1daf0 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -141,7 +141,7 @@ static int decode_and_sort_links(sd_rtnl_message *m, LinkInfo **ret) { c++; } - qsort(links, c, sizeof(LinkInfo), link_info_compare); + qsort_safe(links, c, sizeof(LinkInfo), link_info_compare); *ret = links; links = NULL;