[PATCH 07/12] util: properly handle NULL props in virQEMUBuildObjectCommandlineFromJSON

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/util/virqemu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/util/virqemu.c b/src/util/virqemu.c
index 2e9e65f9ef..712fd1ad4f 100644
--- a/src/util/virqemu.c
+++ b/src/util/virqemu.c
@@ -229,7 +229,8 @@ virQEMUBuildCommandLineJSON(virJSONValuePtr value,
                             virBufferPtr buf,
                             virQEMUBuildCommandLineJSONArrayFormatFunc array)
 {
-    if (virQEMUBuildCommandLineJSONRecurse(NULL, value, buf, array, false) < 0)
+    if (value &&
+        virQEMUBuildCommandLineJSONRecurse(NULL, value, buf, array, false) < 0)
         return -1;
 
     virBufferTrim(buf, ",", -1);
-- 
2.11.1

--
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