65878a
From 98ec954cba5abf87f29cf5122825eb565b5bdf64 Mon Sep 17 00:00:00 2001
65878a
From: Kay Sievers <kay@vrfy.org>
65878a
Date: Sat, 2 Nov 2013 00:01:32 +0100
65878a
Subject: [PATCH] detect_virtualization() returns NULL; pass empty string to
65878a
 dbus
65878a
65878a
---
65878a
 src/core/dbus-manager.c | 4 +++-
65878a
 1 file changed, 3 insertions(+), 1 deletion(-)
65878a
65878a
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
65878a
index 7be5d13..6d16c2a 100644
65878a
--- a/src/core/dbus-manager.c
65878a
+++ b/src/core/dbus-manager.c
65878a
@@ -466,7 +466,7 @@ static int bus_manager_append_progress(DBusMessageIter *i, const char *property,
65878a
 
65878a
 static int bus_manager_append_virt(DBusMessageIter *i, const char *property, void *data) {
65878a
         Manager *m = data;
65878a
-        const char *id = "";
65878a
+        const char *id = NULL;
65878a
 
65878a
         assert(i);
65878a
         assert(property);
65878a
@@ -474,6 +474,8 @@ static int bus_manager_append_virt(DBusMessageIter *i, const char *property, voi
65878a
 
65878a
         detect_virtualization(&id;;
65878a
 
65878a
+        if (!id)
65878a
+                id = "";
65878a
         if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &id))
65878a
                 return -ENOMEM;
65878a