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

[libvirt] [PATCH] Fix free of uninitialized value in LXC numad setup



From: "Daniel P. Berrange" <berrange redhat com>

The 'nodeset' variable was never initialized, causing a later
VIR_FREE(nodeset) to free uninitialized memory.

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---
 src/lxc/lxc_controller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Pushed under trivial rule

diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 37e3ce9..bb369e2 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -517,7 +517,7 @@ static int virLXCControllerGetNumadAdvice(virLXCControllerPtr ctrl,
                                           virBitmapPtr *mask)
 {
     virBitmapPtr nodemask = NULL;
-    char *nodeset;
+    char *nodeset = NULL;
     int ret = -1;
 
     /* Get the advisory nodeset from numad if 'placement' of
-- 
1.7.11.7


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