Skip to content

Commit

Permalink
coverity: close userns file when done
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
hallyn committed Jan 22, 2014
1 parent 32f4b9c commit 452c914
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lxc/lxccontainer.c
Expand Up @@ -1396,8 +1396,10 @@ static inline bool enter_to_ns(struct lxc_container *c) {

if (setns(userns, CLONE_NEWUSER)) {
SYSERROR("failed to setns for CLONE_NEWUSER");
close(userns);
goto out;
}
close(userns);
}

/* Switch to new netns */
Expand Down

0 comments on commit 452c914

Please sign in to comment.