From 791c686a941ccd52ab3f641cf1ca37c97ddc4ad3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 28 Jul 2016 11:52:18 +0200 Subject: [PATCH] conf: set pty_info to NULL after free 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 --- src/lxc/conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 4e36bcb14..076360109 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3840,6 +3840,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; } -- 2.47.2