On Tue, 2013-09-24 at 19:45 -0300, jprvita at gmail.com wrote: > @@ -371,11 +398,8 @@ static void adapter_remove_all(pa_bluetooth_discovery *y) { > > /* When this function is called all devices have already been freed */ > > - while ((a = pa_hashmap_steal_first(y->adapters))) { > - pa_xfree(a->path); > - pa_xfree(a->address); > - pa_xfree(a); > - } > + while ((a = pa_hashmap_steal_first(y->adapters))) > + adapter_free(a); pa_hashmap_remove_all() can be used here (the hashmap initialization needs to be changed so that adapter_free is passed to pa_hashmap_new_full()). Actually, the whole adapter_remove_all() function is now redundant, because it's effectively just an alias for pa_hashmap_remove_all(). -- Tanu