提交 7693f07f 编写于 作者: J Julio Faracco 提交者: Martin Kletzander

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: NJulio Faracco <jcfaracco@gmail.com>
上级 424a21a9
...@@ -1143,8 +1143,8 @@ static int lxcContainerSetupDevices(char **ttyPaths, size_t nttyPaths) ...@@ -1143,8 +1143,8 @@ static int lxcContainerSetupDevices(char **ttyPaths, size_t nttyPaths)
return -1; return -1;
if (virFileBindMountDevice(ttyPaths[i], tty) < 0) { if (virFileBindMountDevice(ttyPaths[i], tty) < 0) {
return -1;
VIR_FREE(tty); VIR_FREE(tty);
return -1;
} }
VIR_FREE(tty); VIR_FREE(tty);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册