[PATCH 1/2] qemuGetDomainHugepagePath: Initialize @ret

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

 



The variable may be used uninitialized in this function.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/qemu/qemu_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index ad85551e9..23a5504e1 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1473,7 +1473,7 @@ qemuGetDomainHugepagePath(const virDomainDef *def,
 {
     char *base = qemuGetBaseHugepagePath(hugepage);
     char *domPath = virDomainObjGetShortName(def);
-    char *ret;
+    char *ret = NULL;
 
     if (base && domPath)
         ignore_value(virAsprintf(&ret, "%s/%s", base, domPath));
-- 
2.11.0

--
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]
  Powered by Linux