mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-24 20:54:19 +08:00
Fix refcount in btd_adapter_any_request_path()
adapter_any_refcount was not being incremented when a pointer to allocated buffer was returned.
This commit is contained in:
parent
12eac6993b
commit
5f7c387957
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user