
11 Apr
2022
11 Apr
'22
3:39 p.m.
From: "fu.lin" <fu.lin10@huawei.com> Conflict:NA Reference:https://gitee.com/src-openeuler/criu/pulls/21 Signed-off-by: fu.lin <fu.lin10@huawei.com> --- criu/tty.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/criu/tty.c b/criu/tty.c index dee8d46..b34cfc2 100644 --- a/criu/tty.c +++ b/criu/tty.c @@ -2023,6 +2023,11 @@ static int dump_one_tty(int lfd, u32 id, const struct fd_parms *p) pr_info("Dumping tty %d with id %#x\n", lfd, id); driver = get_tty_driver(p->stat.st_rdev, p->stat.st_dev); + if (driver == NULL) { + pr_err("Can't get tty driver\n"); + return -1; + } + if (driver->fd_get_index) index = driver->fd_get_index(lfd, p); else -- 2.27.0