summaryrefslogtreecommitdiffstats
path: root/audio_a2dp_hw
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-08-30 12:37:08 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-08-30 13:53:42 -0700
commit7b7d17e2e1dff7a8e168e60ab8983d2d464f7fa8 (patch)
tree378932f34ecb7cdeb2ad4f13ddce67ab0fb24649 /audio_a2dp_hw
parent7411d66877f2364b1cbee846cd64260704176608 (diff)
downloadexternal_bluetooth_bluedroid-7b7d17e2e1dff7a8e168e60ab8983d2d464f7fa8.zip
external_bluetooth_bluedroid-7b7d17e2e1dff7a8e168e60ab8983d2d464f7fa8.tar.gz
external_bluetooth_bluedroid-7b7d17e2e1dff7a8e168e60ab8983d2d464f7fa8.tar.bz2
audio: fix get_parameters()
Fix two bugs in adev_get_parameters(): - the str_parms struct was not destroyed causing a memory leak. - get_parameters() should return an empty string, not NULL. Change-Id: Icdf2803afe82fa4be7950b4659f850b772381f17
Diffstat (limited to 'audio_a2dp_hw')
-rw-r--r--audio_a2dp_hw/audio_a2dp_hw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/audio_a2dp_hw/audio_a2dp_hw.c b/audio_a2dp_hw/audio_a2dp_hw.c
index 9f29313..93eaec2 100644
--- a/audio_a2dp_hw/audio_a2dp_hw.c
+++ b/audio_a2dp_hw/audio_a2dp_hw.c
@@ -942,7 +942,9 @@ static char * adev_get_parameters(const struct audio_hw_device *dev,
str_parms_dump(parms);
- return NULL;
+ str_parms_destroy(parms);
+
+ return strdup("");
}
static int adev_init_check(const struct audio_hw_device *dev)