]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Fix null derefence if attach is called without access to any tty
authorOliver Matthews <oliver@codersoffortune.net>
Sun, 25 Sep 2016 08:37:43 +0000 (09:37 +0100)
committerOliver Matthews <oliver@codersoffortune.net>
Sun, 25 Sep 2016 08:37:43 +0000 (09:37 +0100)
Signed-off-by: Oliver Matthews <oliver@codersoffortune.net>
src/lxc/tools/lxc_attach.c

index 9d7138835777ab752fac10b93637695ce291987a..23d63a22bb43fb1ed3081f9fb28d3ffbcac5b1a1 100644 (file)
@@ -321,7 +321,7 @@ static int get_pty_on_host(struct lxc_container *c, struct wrapargs *wrap, int *
 err3:
        lxc_mainloop_close(&descr);
 err2:
-       if (ts->sigfd != -1)
+       if (ts && ts->sigfd != -1)
                lxc_console_sigwinch_fini(ts);
 err1:
        lxc_console_delete(&conf->console);