Re: [PATCH 1/2] serial: fix DBus message reply

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

 



Hi Gustavo,

On Tue, Sep 13, 2011 at 6:46 AM, Gustavo F. Padovan
<padovan@xxxxxxxxxxxxxx> wrote:
> From: "Gustavo F. Padovan" <padovan@xxxxxxxxxxxxxx>
>
> If reply is NULL we have a crash.
> ---
>  serial/port.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/serial/port.c b/serial/port.c
> index d011084..2cdead4 100644
> --- a/serial/port.c
> +++ b/serial/port.c
> @@ -369,7 +369,7 @@ static void get_record_cb(sdp_list_t *recs, int err, gpointer user_data)
>        GError *gerr = NULL;
>
>        if (!port->listener_id) {
> -               reply = NULL;
> +               reply = btd_error_failed(port->msg, "No listening application");
>                goto failed;
>        }

If we have no listener at this point we should probably not reply
because either the application has called Disconnect or it has exited
the bus, anyway the port->msg need to be unref.

-- 
Luiz Augusto von Dentz
--
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


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux