From: Yu Watanabe Date: Thu, 13 Jun 2019 04:27:42 +0000 (+0900) Subject: networkctl: fix use of uninitialized value X-Git-Tag: v243-rc1~292 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5ca50482493c880eac852bc0b7cf7fa9aab0a451;p=thirdparty%2Fsystemd.git networkctl: fix use of uninitialized value --- diff --git a/src/network/networkctl.c b/src/network/networkctl.c index b265f1f0566..901e88cc98d 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -269,7 +269,7 @@ static int acquire_link_info(sd_bus *bus, sd_netlink *rtnl, char **patterns, Lin return log_error_errno(r, "Failed to enumerate links: %m"); for (i = reply; i; i = sd_netlink_message_next(i)) { - if (!GREEDY_REALLOC(links, allocated, c+1)) + if (!GREEDY_REALLOC0(links, allocated, c+1)) return -ENOMEM; r = decode_link(i, links + c, patterns);