summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-09-07 11:56:12 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-07 15:29:53 -0700
commit997c66406f1d1682f3ad67973ee0fe152d11d0b8 (patch)
treee436cd6cf9598805788c137b3069d2ade76d2f44 /audio
parent43264a066c54ce58ff406dfe828a4669780adfa0 (diff)
downloaddevice_samsung_tuna-997c66406f1d1682f3ad67973ee0fe152d11d0b8.zip
device_samsung_tuna-997c66406f1d1682f3ad67973ee0fe152d11d0b8.tar.gz
device_samsung_tuna-997c66406f1d1682f3ad67973ee0fe152d11d0b8.tar.bz2
audio: fix string leakage in out_get_parameters()
out_get_parameters() was calling strdup() on the string returned by str_parms_to_str() before returning it to the caller. This creates a new string which is never freed as str_parms_to_str() already allocates a new string. Change-Id: I4bcc4aa17ab55e830d7a0569151f717422f6459b
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 5b5e03e..4206893 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -1877,7 +1877,7 @@ static char * out_get_parameters(const struct audio_stream *stream, const char *
i++;
}
str_parms_add_str(reply, AUDIO_PARAMETER_STREAM_SUP_CHANNELS, value);
- str = strdup(str_parms_to_str(reply));
+ str = str_parms_to_str(reply);
} else {
str = strdup(keys);
}