start: close_ns()

parent e836f50a
...@@ -127,10 +127,11 @@ static void close_ns(int ns_fd[LXC_NS_MAX]) ...@@ -127,10 +127,11 @@ static void close_ns(int ns_fd[LXC_NS_MAX])
int i; int i;
for (i = 0; i < LXC_NS_MAX; i++) { for (i = 0; i < LXC_NS_MAX; i++) {
if (ns_fd[i] > -1) { if (ns_fd[i] < 0)
close(ns_fd[i]); continue;
ns_fd[i] = -1;
} close(ns_fd[i]);
ns_fd[i] = -EBADF;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment