[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] LXC: fix memory leak in lxcContainerMountFSBlockHelper



we alloc the memory for format in lxcContainerMountDetectFilesystem
but without free it in lxcContainerMountFSBlockHelper.

this patch just call VIR_FREE to free it.

Signed-off-by: Gao feng <gaofeng cn fujitsu com>
---
 src/lxc/lxc_container.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 297bd6d..5651255 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -1014,6 +1014,7 @@ static int lxcContainerMountFSBlockHelper(virDomainFSDefPtr fs,
     }
 
 cleanup:
+    VIR_FREE(format);
     return ret;
 }
 
-- 
1.7.7.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]