[systemd-commits] src/core

Kay Sievers kay at kemper.freedesktop.org
Sat Nov 2 00:04:57 CET 2013


 src/core/dbus-manager.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 98e6c5e62ffcec33bd5255ebaafeafdc5a3f1ada
Author: Kay Sievers <kay at vrfy.org>
Date:   Sat Nov 2 00:01:32 2013 +0100

    detect_virtualization() returns NULL; pass empty string to dbus

diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 46f55d0..b47fc85 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -466,7 +466,7 @@ static int bus_manager_append_progress(DBusMessageIter *i, const char *property,
 
 static int bus_manager_append_virt(DBusMessageIter *i, const char *property, void *data) {
         Manager *m = data;
-        const char *id = "";
+        const char *id = NULL;
 
         assert(i);
         assert(property);
@@ -474,6 +474,8 @@ static int bus_manager_append_virt(DBusMessageIter *i, const char *property, voi
 
         detect_virtualization(&id);
 
+        if (!id)
+                id = "";
         if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &id))
                 return -ENOMEM;
 



More information about the systemd-commits mailing list