networkctl: use safe_qsort in case no links are present

Unlikely to happen but still...
This commit is contained in:
Thomas Hindoe Paaboel Andersen
2014-08-16 23:49:36 +02:00
parent f1e3bee216
commit a6a4f52889
+1 -1
View File
@@ -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;