bluez5-util: add destroy function

Add a destroy function to the transport that is called before freeing
the transport. Useful for cleaning up extra userdata.
This commit is contained in:
Wim Taymans 2014-10-24 09:56:50 +02:00 committed by Arun Raghavan
parent 2251085dda
commit d7199bafea
2 changed files with 4 additions and 0 deletions

View file

@ -205,6 +205,8 @@ void pa_bluetooth_transport_unlink(pa_bluetooth_transport *t) {
void pa_bluetooth_transport_free(pa_bluetooth_transport *t) {
pa_assert(t);
if (t->destroy)
t->destroy(t);
pa_bluetooth_transport_unlink(t);
pa_xfree(t->owner);