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
d83e85cf
Unverified
Commit
d83e85cf
authored
Dec 07, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coverity: #1425921
free allocated memory Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
241f7d14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
attach.c
src/lxc/attach.c
+10
-3
No files found.
src/lxc/attach.c
View file @
d83e85cf
...
@@ -557,6 +557,7 @@ static char *lxc_attach_getpwshell(uid_t uid)
...
@@ -557,6 +557,7 @@ static char *lxc_attach_getpwshell(uid_t uid)
if
(
waitpid
(
pid
,
&
status
,
0
)
<
0
)
{
if
(
waitpid
(
pid
,
&
status
,
0
)
<
0
)
{
if
(
errno
==
EINTR
)
if
(
errno
==
EINTR
)
goto
again
;
goto
again
;
free
(
result
);
return
NULL
;
return
NULL
;
}
}
...
@@ -565,14 +566,20 @@ static char *lxc_attach_getpwshell(uid_t uid)
...
@@ -565,14 +566,20 @@ static char *lxc_attach_getpwshell(uid_t uid)
* we assume we don't
* we assume we don't
*/
*/
if
(
!
WIFEXITED
(
status
))
if
(
!
WIFEXITED
(
status
))
{
free
(
result
);
return
NULL
;
return
NULL
;
}
if
(
WEXITSTATUS
(
status
)
!=
0
)
if
(
WEXITSTATUS
(
status
)
!=
0
)
{
free
(
result
);
return
NULL
;
return
NULL
;
}
if
(
!
found
)
if
(
!
found
)
{
free
(
result
);
return
NULL
;
return
NULL
;
}
return
result
;
return
result
;
}
else
{
}
else
{
...
...
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