Re: [PATCH v3 2/4] Advertising data: extract local name

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

 



Hi,

On Thu, Nov 11, 2010, Vinicius Costa Gomes wrote:
> @@ -3159,6 +3160,12 @@ void adapter_update_device_from_info(struct btd_adapter *adapter,
>  
>  	adapter->found_devices = g_slist_sort(adapter->found_devices,
>  						(GCompareFunc) dev_rssi_cmp);
> +
> +	if (info->length) {
> +		char *tmp_name = bt_extract_eir_name(info->data, &type);
> +		if (tmp_name)
> +			dev->name = tmp_name;
> +	}
>  }

This looks like a potential memory leak to me. What if dev->name was
already set (e.g. by a previous event for the same device)?

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