From e71d570bb84a80c9543e0797c0a9bf2082ac88f5 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Fri, 7 Sep 2012 11:56:12 -0700 Subject: 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 --- audio/audio_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio') 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); } -- cgit v1.1