bluez a2dp - destroy thread attr after thread create
Pthread resources may be used by the thread attributes object.
We should destroy this after thread creation.
diff --git a/audio/liba2dp.c b/audio/liba2dp.c
index 5c4ef51..98fd8cd 100755
--- a/audio/liba2dp.c
+++ b/audio/liba2dp.c
@@ -1068,12 +1068,14 @@
pthread_cond_signal(&data->thread_wait);
pthread_mutex_unlock(&data->mutex);
+ pthread_attr_destroy(&attr);
*dataPtr = data;
return 0;
error:
bluetooth_close(data);
sbc_finish(&data->sbc);
+ pthread_attr_destroy(&attr);
a2dp_free(data);
return err;