[pulseaudio-discuss] [PATCH] zeroconf-publish: fix unitialized DBusError

Tanu Kaskinen tanuk at iki.fi
Thu Jan 12 04:37:29 UTC 2017


On Wed, 2017-01-11 at 17:22 +0530, Arun Raghavan wrote:
> On Wed, 11 Jan 2017, at 12:04 PM, Tanu Kaskinen wrote:
> > The uninitialized error struct might be the cause for the crash
> > reported here: https://bugs.archlinux.org/task/52484
> > 
> > ---
> >  src/modules/module-zeroconf-publish.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/src/modules/module-zeroconf-publish.c
> > b/src/modules/module-zeroconf-publish.c
> > index e9710292a..4cbfd1eab 100644
> > --- a/src/modules/module-zeroconf-publish.c
> > +++ b/src/modules/module-zeroconf-publish.c
> > @@ -679,6 +679,8 @@ static char *get_icon_name(pa_module*m) {
> >      DBusConnection *conn = NULL;
> >      DBusMessageIter sub;
> >  
> > +    dbus_error_init(&error);
> > +
> 
> There's already a call to this later in this function, so that should be
> deleted as well.
> 
> >      if (!(bus = pa_dbus_bus_get(m->core, DBUS_BUS_SYSTEM, &error))) {
> >          pa_log("Failed to get system bus connection: %s",
> >          error.message);
> 
> Need to add a dbus_error_free() here.

Oops! Good that one of us is paying attention :)

-- 
Tanu

https://www.patreon.com/tanuk


More information about the pulseaudio-discuss mailing list