[systemd-commits] src/network

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Sat Aug 16 14:49:48 PDT 2014


 src/network/networkctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a6a4f528899b1dab47408733b4a423c66ea40f7a
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Sat Aug 16 23:18:32 2014 +0200

    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 6253cbf..2a7a1da 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;



More information about the systemd-commits mailing list