zeroconf-publish: fix uninitialized variable
authorTanu Kaskinen <tanuk@iki.fi>
Mon, 5 Sep 2016 15:55:37 +0000 (18:55 +0300)
committerTanu Kaskinen <tanuk@iki.fi>
Mon, 5 Sep 2016 15:59:27 +0000 (18:59 +0300)
get_icon_name() returns the icon_name variable, and without this
change the function might exit before icon_name is initialized.

src/modules/module-zeroconf-publish.c

index 1816c74..c101b81 100644 (file)
@@ -670,7 +670,7 @@ static int avahi_process_msg(pa_msgobject *o, int code, void *data, int64_t offs
 static char *get_icon_name(pa_module*m) {
     const char *interface = HOSTNAME_DBUS_INTERFACE;
     const char *property = HOSTNAME_DBUS_ICON_PROPERTY;
-    char *icon_name;
+    char *icon_name = NULL;
     pa_dbus_connection *bus;
     DBusError error;
     DBusMessageIter args;