Skip to content

Commit

Permalink
log: restore non-local value
Browse files Browse the repository at this point in the history
Fixes: Coverity 1461734.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner authored and stgraber committed Apr 15, 2020
1 parent dfa49f0 commit 10b15ed
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lxc/log.c
Expand Up @@ -485,10 +485,9 @@ static int build_dir(const char *name)
*p = '\0';

ret = lxc_unpriv(mkdir(n, 0755));
*p = '/';
if (ret && errno != EEXIST)
return log_error_errno(-errno, errno, "Failed to create directory \"%s\"", n);

*p = '/';
}

return 0;
Expand Down

0 comments on commit 10b15ed

Please sign in to comment.