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