mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-06 08:39:22 +00:00
Set the right variable to NULL when unsetting ipv6_gateway
We were freeing one and setting a different one to NULL, eventually leading to a crash when closing the netdev (at container shutdown) and freeing already-freed memory. Closes #732 Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
c7ec3de825
commit
ffe344373e
@ -971,7 +971,7 @@ static int config_network_ipv6_gateway(const char *key, const char *value,
|
||||
free(netdev->ipv6_gateway);
|
||||
|
||||
if (!value || strlen(value) == 0) {
|
||||
netdev->ipv4_gateway = NULL;
|
||||
netdev->ipv6_gateway = NULL;
|
||||
} else if (!strcmp(value, "auto")) {
|
||||
netdev->ipv6_gateway = NULL;
|
||||
netdev->ipv6_gateway_auto = true;
|
||||
|
Loading…
Reference in New Issue
Block a user