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
bec695f3
Commit
bec695f3
authored
May 03, 2013
by
Dwight Engen
Committed by
Serge Hallyn
May 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coverity: fix leak when ipv6 gw is auto
Signed-off-by:
Dwight Engen
<
dwight.engen@oracle.com
>
Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
parent
8950ee8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
confile.c
src/lxc/confile.c
+6
-6
No files found.
src/lxc/confile.c
View file @
bec695f3
...
...
@@ -782,12 +782,6 @@ static int config_network_ipv6_gateway(const char *key, const char *value,
if
(
!
netdev
)
return
-
1
;
gw
=
malloc
(
sizeof
(
*
gw
));
if
(
!
gw
)
{
SYSERROR
(
"failed to allocate ipv6 gateway address"
);
return
-
1
;
}
if
(
!
value
)
{
ERROR
(
"no ipv6 gateway address specified"
);
return
-
1
;
...
...
@@ -797,6 +791,12 @@ static int config_network_ipv6_gateway(const char *key, const char *value,
netdev
->
ipv6_gateway
=
NULL
;
netdev
->
ipv6_gateway_auto
=
true
;
}
else
{
gw
=
malloc
(
sizeof
(
*
gw
));
if
(
!
gw
)
{
SYSERROR
(
"failed to allocate ipv6 gateway address"
);
return
-
1
;
}
if
(
!
inet_pton
(
AF_INET6
,
value
,
gw
))
{
SYSERROR
(
"invalid ipv6 gateway address: %s"
,
value
);
free
(
gw
);
...
...
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