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
6b9be523
Unverified
Commit
6b9be523
authored
Dec 06, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coverity: #1425734
free memory on error Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
cfeeed19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
lxccontainer.c
src/lxc/lxccontainer.c
+5
-4
No files found.
src/lxc/lxccontainer.c
View file @
6b9be523
...
...
@@ -4383,7 +4383,7 @@ WRAP_API_2(bool, lxcapi_detach_interface, const char *, const char *)
static
int
do_lxcapi_migrate
(
struct
lxc_container
*
c
,
unsigned
int
cmd
,
struct
migrate_opts
*
opts
,
unsigned
int
size
)
{
int
ret
;
int
ret
=
-
1
;
struct
migrate_opts
*
valid_opts
=
opts
;
/* If the caller has a bigger (newer) struct migrate_opts, let's make
...
...
@@ -4420,21 +4420,21 @@ static int do_lxcapi_migrate(struct lxc_container *c, unsigned int cmd,
case
MIGRATE_PRE_DUMP
:
if
(
!
do_lxcapi_is_running
(
c
))
{
ERROR
(
"container is not running"
);
return
false
;
goto
on_error
;
}
ret
=
!
__criu_pre_dump
(
c
,
valid_opts
);
break
;
case
MIGRATE_DUMP
:
if
(
!
do_lxcapi_is_running
(
c
))
{
ERROR
(
"container is not running"
);
return
false
;
goto
on_error
;
}
ret
=
!
__criu_dump
(
c
,
valid_opts
);
break
;
case
MIGRATE_RESTORE
:
if
(
do_lxcapi_is_running
(
c
))
{
ERROR
(
"container is already running"
);
return
false
;
goto
on_error
;
}
ret
=
!
__criu_restore
(
c
,
valid_opts
);
break
;
...
...
@@ -4443,6 +4443,7 @@ static int do_lxcapi_migrate(struct lxc_container *c, unsigned int cmd,
ret
=
-
EINVAL
;
}
on_error
:
if
(
size
<
sizeof
(
*
opts
))
free
(
valid_opts
);
...
...
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