aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lxc/conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 523270e..4f445a3 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -1007,7 +1007,7 @@ int lxc_create_tty(const char *name, struct lxc_conf *conf)
return 0;
tty_info->pty_info =
- malloc(sizeof(*tty_info->pty_info)*tty_info->nbtty);
+ malloc(sizeof(*tty_info->pty_info)*conf->tty);
if (!tty_info->pty_info) {
SYSERROR("failed to allocate pty_info");
return -1;