lxc: free 'ttyFDs' array on return from lxcVmStart

Detected by Coverity. Leak introduced in commit 0f31f7b.

* src/lxc/lxc_driver.c: Clean up on failure.

Signed-off-by: Alex Jia <ajia@redhat.com>
This commit is contained in:
Alex Jia 2011-11-09 14:51:26 +08:00 committed by Michal Privoznik
parent 5ab243b64f
commit b9338ac828
1 changed files with 1 additions and 0 deletions

View File

@ -1850,6 +1850,7 @@ cleanup:
}
for (i = 0 ; i < nttyFDs ; i++)
VIR_FORCE_CLOSE(ttyFDs[i]);
VIR_FREE(ttyFDs);
VIR_FORCE_CLOSE(handshakefds[0]);
VIR_FORCE_CLOSE(handshakefds[1]);
VIR_FREE(logfile);