Hi Johan, On Wed, Dec 15, 2010 at 4:54 PM, Claudio Takahasi <claudio.takahasi@xxxxxxxxxxxxx> wrote: > This function can fail if the device object is already registered or if > the system doesn't have enough memory. Issue detected due wrong device > object reference counting that doesn't unregister the D-Bus object path > when the device is removed. > --- > Âsrc/adapter.c | Â Â6 ++++-- > Â1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/adapter.c b/src/adapter.c > index c1fddce..f71d063 100644 > --- a/src/adapter.c > +++ b/src/adapter.c > @@ -1595,7 +1595,8 @@ static DBusMessage *create_device(DBusConnection *conn, > > Â Â Â Âdevice = adapter_create_device(conn, adapter, address, type); > Â Â Â Âif (!device) > - Â Â Â Â Â Â Â return NULL; > + Â Â Â Â Â Â Â return btd_error_failed(msg, > + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "Unable to create a new device object"); > > Â Â Â Âif (type == DEVICE_TYPE_LE && !event_is_connectable(dev->evt_type)) { > Â Â Â Â Â Â Â Â/* Device is not connectable */ > @@ -1693,7 +1694,8 @@ static DBusMessage *create_paired_device(DBusConnection *conn, > > Â Â Â Â Â Â Â Âdevice = adapter_create_device(conn, adapter, address, type); > Â Â Â Â Â Â Â Âif (!device) > - Â Â Â Â Â Â Â Â Â Â Â return NULL; > + Â Â Â Â Â Â Â Â Â Â Â return btd_error_failed(msg, > + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "Unable to create a new device object"); > Â Â Â Â} else > Â Â Â Â Â Â Â Âtype = device_get_type(device); > > -- > 1.7.3.3 > > This patch is not necessary anymore. Please ignore it! Claudio -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html