]>
Commit | Line | Data |
---|---|---|
c6af9a11 WB |
1 | From e00c024230e457a0f37ea5c90bd8caac0c30020e Mon Sep 17 00:00:00 2001 |
2 | From: Wolfgang Bumiller <w.bumiller@proxmox.com> | |
3 | Date: Thu, 28 Jul 2016 11:52:18 +0200 | |
4 | Subject: [PATCH] conf: set pty_info to NULL after free | |
5 | ||
6 | This fixes a double free corruption on container-requested | |
7 | reboots when lxc_spawn() fails before receiving the ttys, as | |
8 | lxc_fini() (part of __lxc_start()'s cleanup) calls | |
9 | lxc_delete_tty(). | |
10 | ||
11 | Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> | |
12 | --- | |
13 | src/lxc/conf.c | 1 + | |
14 | 1 file changed, 1 insertion(+) | |
15 | ||
16 | diff --git a/src/lxc/conf.c b/src/lxc/conf.c | |
17 | index 48a2978..1e330ac 100644 | |
18 | --- a/src/lxc/conf.c | |
19 | +++ b/src/lxc/conf.c | |
20 | @@ -3327,6 +3327,7 @@ void lxc_delete_tty(struct lxc_tty_info *tty_info) | |
21 | } | |
22 | ||
23 | free(tty_info->pty_info); | |
24 | + tty_info->pty_info = NULL; | |
25 | tty_info->nbtty = 0; | |
26 | } | |
27 | ||
28 | -- | |
29 | 2.1.4 | |
30 |