]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: set pty_info to NULL after free 1106/head
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 28 Jul 2016 09:52:18 +0000 (11:52 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 28 Jul 2016 13:13:41 +0000 (15:13 +0200)
This fixes a double free corruption on container-requested
reboots when lxc_spawn() fails before receiving the ttys, as
lxc_fini() (part of __lxc_start()'s cleanup) calls
lxc_delete_tty().

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/lxc/conf.c

index 48a29787d70ea1be59a2310bcf1e644d0db93e0b..1e330ac9dc2a01dcec29ec0c9b609c48b2d33150 100644 (file)
@@ -3327,6 +3327,7 @@ void lxc_delete_tty(struct lxc_tty_info *tty_info)
        }
 
        free(tty_info->pty_info);
+       tty_info->pty_info = NULL;
        tty_info->nbtty = 0;
 }