Re: [PATCH obexd 2/3] client: Wait for abort completion before Transfer.Cancel returns

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

 



Hi Jaganath,

On Mon, Apr 30, 2012 at 2:03 PM, Jaganath Kanakkassery
<jaganath.k@xxxxxxxxxxx> wrote:
> -       if (callback) {
> -               GError *err;
> +       dbus_message_unref(transfer->msg);
> +       transfer->msg = NULL;
>
> +       if (callback) {
>                err = g_error_new(OBC_TRANSFER_ERROR, -ECANCELED, "%s",
>                                                        strerror(ECANCELED));
>                callback->func(transfer, transfer->transferred, err,

This looks wrong, you should not overwrite the err if it is set as it
will leak, you probably should forward the err if not NULL or create a
new GError if abort was successful because either way we are going to
stop the transfer.

-- 
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