render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
adeaf8
From 580025d7a58ee4c07312d33aa78186dbe7e0d9ee Mon Sep 17 00:00:00 2001
adeaf8
From: Michal Privoznik <mprivozn@redhat.com>
adeaf8
Date: Tue, 3 Sep 2013 18:56:06 +0200
adeaf8
Subject: [PATCH] virFileNBDDeviceAssociate: Avoid use of uninitialized
adeaf8
 variable
adeaf8
adeaf8
The @qemunbd variable can be used uninitialized.
adeaf8
adeaf8
(cherry picked from commit 2dba0323ff0cec31bdcea9dd3b2428af297401f2)
adeaf8
---
adeaf8
 src/util/virfile.c | 2 +-
adeaf8
 1 file changed, 1 insertion(+), 1 deletion(-)
adeaf8
adeaf8
diff --git a/src/util/virfile.c b/src/util/virfile.c
adeaf8
index 2b07ac9..7af0843 100644
adeaf8
--- a/src/util/virfile.c
adeaf8
+++ b/src/util/virfile.c
adeaf8
@@ -732,7 +732,7 @@ int virFileNBDDeviceAssociate(const char *file,
adeaf8
                               char **dev)
adeaf8
 {
adeaf8
     char *nbddev;
adeaf8
-    char *qemunbd;
adeaf8
+    char *qemunbd = NULL;
adeaf8
     virCommandPtr cmd = NULL;
adeaf8
     int ret = -1;
adeaf8
     const char *fmtstr = NULL;