Unverified Commit 88e27cd6 by Stéphane Graber Committed by GitHub

Merge pull request #3699 from brauner/2021-02-26/network

network: fix networks with switched names
parents 32d40452 3a197a1b
......@@ -165,7 +165,7 @@ struct lxc_netdev *lxc_network_add(struct lxc_list *networks, int idx, bool tail
__do_free struct lxc_netdev *netdev = NULL;
/* network does not exist */
netdev = malloc(sizeof(*netdev));
netdev = zalloc(sizeof(*netdev));
if (!netdev)
return ret_set_errno(NULL, ENOMEM);
......@@ -177,7 +177,7 @@ struct lxc_netdev *lxc_network_add(struct lxc_list *networks, int idx, bool tail
netdev->idx = idx;
/* prepare new list */
newlist = malloc(sizeof(*newlist));
newlist = zalloc(sizeof(*newlist));
if (!newlist)
return ret_set_errno(NULL, ENOMEM);
......
......@@ -165,6 +165,7 @@ struct lxc_netdev {
bool l2proxy;
char name[IFNAMSIZ];
char created_name[IFNAMSIZ];
char transient_name[IFNAMSIZ];
char *hwaddr;
char *mtu;
union netdev_p priv;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment