[PATCH] zeroconf-publish: fix unitialized DBusError

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux