On Mon, 10 Oct 2011 19:16:26 +0200 Daniele Forsi <dforsi@xxxxxxxxx> wrote: > 2011/10/10 Antonio Ospite: > > > +char *btd_manager_get_default_adapter_str(void) > > > + char *str = bt_malloc(18); > > + > > + adapter = manager_get_default_adapter(); > > + if (adapter == NULL) { > > + return NULL; > > you are leaking str if you return here > -- > Daniele Forsi Thanks Daniele, I'll move the allocation down, just before using str. Not that it is an excuse, but those patches are more to test the water than meant for inclusion as they are :) For the record, I originally intended to use batostr() here, unfortunately it returns the bdaddr reversed and fixing it would break the API. Regards, Antonio -- Antonio Ospite http://ao2.it PGP public key ID: 0x4553B001 A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing?
Attachment:
pgpIQ0ymDnpdq.pgp
Description: PGP signature