mirror of https://gitee.com/openkylin/libvirt.git
lxc: Fix wrong VIR_FREE after a return statement
There is a VIR_FREE after a return statement. That code section is never executed and for this reason the "tty" variable is not being freed. This commit rearranges the logic. Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
This commit is contained in:
parent
424a21a9c8
commit
7693f07fee
|
@ -1143,8 +1143,8 @@ static int lxcContainerSetupDevices(char **ttyPaths, size_t nttyPaths)
|
|||
return -1;
|
||||
|
||||
if (virFileBindMountDevice(ttyPaths[i], tty) < 0) {
|
||||
return -1;
|
||||
VIR_FREE(tty);
|
||||
return -1;
|
||||
}
|
||||
|
||||
VIR_FREE(tty);
|
||||
|
|
Loading…
Reference in New Issue