Re: [PATCH] Fix refcount in btd_adapter_any_request_path()

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

 



Hi Lizardo,

On Fri, Feb 04, 2011, Anderson Lizardo wrote:
> adapter_any_refcount was not being incremented when a pointer to
> allocated buffer was returned.
> ---
>  src/adapter.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/src/adapter.c b/src/adapter.c
> index 08098a5..3e609c1 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -3428,11 +3428,10 @@ const char *adapter_any_get_path(void)
>  
>  const char *btd_adapter_any_request_path(void)
>  {
> -	if (adapter_any_refcount > 0)
> +	if (adapter_any_refcount++ > 0)
>  		return adapter_any_path;
>  
>  	adapter_any_path = g_strdup_printf("%s/any", manager_get_base_path());
> -	adapter_any_refcount++;
>  
>  	return adapter_any_path;
>  }

Nice catch. The patch has been pushed upstream. Thanks.

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