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:
Julio Faracco 2017-05-25 19:28:14 -03:00 committed by Martin Kletzander
parent 424a21a9c8
commit 7693f07fee
1 changed files with 1 additions and 1 deletions

View File

@ -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);