Re: [PATCH] gobex: Fix use after free

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

 



Hi Andrei,

On Thu, Jul 31, 2014 at 4:35 PM, Andrei Emeltchenko
<Andrei.Emeltchenko.news@xxxxxxxxx> wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>
>
> It is better not to dereference freed pointer
> ---
>  gobex/gobex.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/gobex/gobex.c b/gobex/gobex.c
> index 3848884..35e546f 100644
> --- a/gobex/gobex.c
> +++ b/gobex/gobex.c
> @@ -263,8 +263,6 @@ static gboolean req_timeout(gpointer user_data)
>         g_error_free(err);
>         pending_pkt_free(p);
>
> -       p->timeout_id = 0;
> -

A more correct fix would be to move this line to the beginning of the
function so we don't call g_source_remove unnecessarily.


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