From 31e0a46ded22a517c03cb899f890207f0db75fb8 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 26 Nov 2020 16:34:38 +0000 Subject: [PATCH] jail: properly initialize timens_fd So we are safe for the future. Signed-off-by: Daniel Golle --- jail/jail.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jail/jail.c b/jail/jail.c index 7ec6cd8..82ba4a5 100644 --- a/jail/jail.c +++ b/jail/jail.c @@ -2775,6 +2775,8 @@ static void post_main(struct uloop_timeout *t) if (opts.setns.time != -1) { timens_fd = ns_open_pid("time", getpid()); setns_open(CLONE_NEWTIME); + } else { + timens_fd = -1; } #endif -- 2.30.2