Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
3715d0c0
Unverified
Commit
3715d0c0
authored
Oct 28, 2020
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utils: don't deref after NULL check
Fixes: Coverity 1465855 Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
ec0befee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
utils.c
src/lxc/utils.c
+1
-1
No files found.
src/lxc/utils.c
View file @
3715d0c0
...
@@ -1113,7 +1113,7 @@ int safe_mount_beneath(const char *beneath, const char *src, const char *dst, co
...
@@ -1113,7 +1113,7 @@ int safe_mount_beneath(const char *beneath, const char *src, const char *dst, co
__do_close
int
beneath_fd
=
-
EBADF
;
__do_close
int
beneath_fd
=
-
EBADF
;
const
char
*
path
=
beneath
?
beneath
:
"/"
;
const
char
*
path
=
beneath
?
beneath
:
"/"
;
beneath_fd
=
openat
(
-
1
,
bene
ath
,
O_RDONLY
|
O_CLOEXEC
|
O_DIRECTORY
|
O_PATH
);
beneath_fd
=
openat
(
-
1
,
p
ath
,
O_RDONLY
|
O_CLOEXEC
|
O_DIRECTORY
|
O_PATH
);
if
(
beneath_fd
<
0
)
if
(
beneath_fd
<
0
)
return
log_error_errno
(
-
errno
,
errno
,
"Failed to open %s"
,
path
);
return
log_error_errno
(
-
errno
,
errno
,
"Failed to open %s"
,
path
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment