[PATCH 2/2] Implement HandsfreeGateway Interface
Vinicius Gomes
vinicius.gomes at openbossa.org
Thu Jan 21 13:20:23 PST 2010
Hi Gustavo,
On Thu, Jan 21, 2010 at 5:31 PM, Gustavo F. Padovan
<padovan at profusion.mobi> wrote:
> + gw->sco = chan;
> + g_io_channel_ref(chan);
> +
You must have forgotten to change this.
> @@ -307,17 +565,15 @@ struct gateway *gateway_init(struct audio_device *dev)
> {
> struct gateway *gw;
>
> + gw = g_new0(struct gateway, 1);
> +
> if (!g_dbus_register_interface(dev->conn, dev->path,
> AUDIO_GATEWAY_INTERFACE,
> gateway_methods, gateway_signals,
> NULL, dev, NULL))
> return NULL;
>
Seems like gw is leaking if registration fails. Move it down a little, perhaps?
> - debug("in gateway_init, dev is %p", dev);
> - gw = g_new0(struct gateway, 1);
> - gw->state = GATEWAY_STATE_DISCONNECTED;
> return gw;
> -
> }
>
Cheers,
--
Vinicius Gomes
INdT - Instituto Nokia de Tecnologia
More information about the ofono
mailing list