From: Torsten Fohrer Date: Thu, 23 Mar 2017 13:58:33 +0000 (+0100) Subject: Keep veth.pair.name on network shutdown X-Git-Tag: lxc-2.1.0~169^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1487%2Fhead;p=thirdparty%2Flxc.git Keep veth.pair.name on network shutdown In case of a container that is rebooting, freeing veth.pair.name here results in losing given veth.pair name (Only if given lxc_netdev is reused). Signed-off-by: Torsten Fohrer --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index fc80b01e1..d0c51f659 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3026,8 +3026,6 @@ bool lxc_delete_network(struct lxc_handler *handler) WARN("Failed to remove interface \"%s\" from host: %s.", hostveth, strerror(-ret)); } else { INFO("Removed interface \"%s\" from host.", hostveth); - free(netdev->priv.veth_attr.pair); - netdev->priv.veth_attr.pair = NULL; } } else if (strlen(netdev->priv.veth_attr.veth1) > 0) { hostveth = netdev->priv.veth_attr.veth1;