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:18:32 +02:00
parent f1e3bee216
commit a6a4f52889
1 changed files with 1 additions and 1 deletions

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;