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

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

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

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

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]