chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
networkctl: use safe_qsort in case no links are present
[elogind.git]
/
src
/
network
/
networkctl.c
diff --git
a/src/network/networkctl.c
b/src/network/networkctl.c
index 6253cbf582c9a1b776521dd02b2538bdafbb48bf..2a7a1daf0f3b26ed05aa8071fe322b9bf55e9c9e 100644
(file)
--- 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;