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
dd66e5ad
Commit
dd66e5ad
authored
May 07, 2013
by
Dwight Engen
Committed by
Stéphane Graber
May 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coverity: fix potential dereference NULL returned from malloc
Signed-off-by:
Dwight Engen
<
dwight.engen@oracle.com
>
Acked-by:
Serge E. Hallyn
<
serge.hallyn@ubuntu.com
>
parent
f2bbe86d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
network.c
src/lxc/network.c
+4
-1
No files found.
src/lxc/network.c
View file @
dd66e5ad
...
@@ -783,8 +783,11 @@ static int ifa_get_local_ip(int family, struct ip_req *ip_info, void** res) {
...
@@ -783,8 +783,11 @@ static int ifa_get_local_ip(int family, struct ip_req *ip_info, void** res) {
/* We might have found an IFA_ADDRESS before,
/* We might have found an IFA_ADDRESS before,
* which we now overwrite with an IFA_LOCAL. */
* which we now overwrite with an IFA_LOCAL. */
if
(
!*
res
)
if
(
!*
res
)
{
*
res
=
malloc
(
addrlen
);
*
res
=
malloc
(
addrlen
);
if
(
!*
res
)
return
-
1
;
}
memcpy
(
*
res
,
RTA_DATA
(
rta
),
addrlen
);
memcpy
(
*
res
,
RTA_DATA
(
rta
),
addrlen
);
...
...
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