From 7b7d17e2e1dff7a8e168e60ab8983d2d464f7fa8 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Thu, 30 Aug 2012 12:37:08 -0700 Subject: 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 --- audio_a2dp_hw/audio_a2dp_hw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- cgit v1.1