[pulseaudio-discuss] [PATCH v2] zeroconf-publish: fix unitialized DBusError
Arun Raghavan
arun at arunraghavan.net
Thu Jan 12 07:19:16 UTC 2017
On Thu, 12 Jan 2017, at 10:15 AM, Tanu Kaskinen wrote:
> BugLink: https://bugs.archlinux.org/task/52484
> ---
> src/modules/module-zeroconf-publish.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/modules/module-zeroconf-publish.c
> b/src/modules/module-zeroconf-publish.c
> index e9710292a..482881c5b 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);
> --
Looks good!
-- Arun
More information about the pulseaudio-discuss
mailing list