From b9338ac8289ca3ce84df671b1216c8a71738e334 Mon Sep 17 00:00:00 2001 From: Alex Jia Date: Wed, 9 Nov 2011 14:51:26 +0800 Subject: [PATCH] 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 --- src/lxc/lxc_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 37092bc976..a1d0a7ce8f 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -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); -- 2.47.2