[pulseaudio-commits] src/modules

Tanu Kaskinen tanuk at kemper.freedesktop.org
Thu Jan 12 12:11:23 UTC 2017


 src/modules/module-zeroconf-publish.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 0530c252b433b53f6e5cea31618b3e144f02978f
Author: Tanu Kaskinen <tanuk at iki.fi>
Date:   Thu Jan 12 06:45:20 2017 +0200

    zeroconf-publish: fix unitialized DBusError
    
    BugLink: https://bugs.archlinux.org/task/52484

diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c
index e971029..482881c 100644
--- a/src/modules/module-zeroconf-publish.c
+++ b/src/modules/module-zeroconf-publish.c
@@ -679,8 +679,11 @@ static char *get_icon_name(pa_module*m) {
     DBusConnection *conn = NULL;
     DBusMessageIter sub;
 
+    dbus_error_init(&error);
+
     if (!(bus = pa_dbus_bus_get(m->core, DBUS_BUS_SYSTEM, &error))) {
         pa_log("Failed to get system bus connection: %s", error.message);
+        dbus_error_free(&error);
         goto out;
     }
 
@@ -692,7 +695,6 @@ static char *get_icon_name(pa_module*m) {
                                        "Get");
     dbus_message_append_args(msg, DBUS_TYPE_STRING, &interface, DBUS_TYPE_STRING, &property, DBUS_TYPE_INVALID);
 
-    dbus_error_init(&error);
     if ((reply = dbus_connection_send_with_reply_and_block(conn, msg, -1, &error)) == NULL) {
         pa_log("Failed to send: %s:%s", error.name, error.message);
         dbus_error_free(&error);



More information about the pulseaudio-commits mailing list