mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 06:25:37 +03:00
networkctl: fix use of uninitialized value
This commit is contained in:
parent
9c5e1c24ad
commit
5ca5048249
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user