aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2009-09-28 23:47:44 +0800
committerNick Pelly <npelly@google.com>2009-09-29 17:08:57 -0700
commit5053b04fd2a49c2a2f95efd83445b7d2be42ef6d (patch)
treea402d367e8114cdcf63c3a143669a74bed97c033
parent2caa4ae5af5d415a3788739b93625391983916ad (diff)
downloadbluez-5053b04fd2a49c2a2f95efd83445b7d2be42ef6d.tar.gz
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.
-rwxr-xr-xaudio/liba2dp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/liba2dp.c b/audio/liba2dp.c
index 5c4ef51c..98fd8cdf 100755
--- a/audio/liba2dp.c
+++ b/audio/liba2dp.c
@@ -1068,12 +1068,14 @@ int a2dp_init(int rate, int channels, a2dpData* dataPtr)
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;