summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngela Stegmaier <a0866189@ti.com>2014-04-15 15:53:19 -0500
committerGerrit Code Review <gerrit2@git.omapzoom.org>2014-06-03 14:54:49 -0500
commitfe4561a100a8a0205d1bfab0bd85da4da03942fa (patch)
treef8f1c647bfff181597ba4bcf67e1f15bd128d66d
parent3d3ef412e122bf8ab706153a657d3b26ec74e1fd (diff)
downloadjacinto6evm-fe4561a100a8a0205d1bfab0bd85da4da03942fa.tar.gz
audio: Legacy: Initialize Variables to NULL
If uninitialized, then a crash may result if they were not successfully allocated during the constructor and then the destructor runs. Change-Id: Iad15e558fe6ba9b42aab482511cd30c1476f0f18 Signed-off-by: Angela Stegmaier <a0866189@ti.com>
-rw-r--r--audio/legacy/audio_hw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/legacy/audio_hw.c b/audio/legacy/audio_hw.c
index cef97c5..1ce01f5 100644
--- a/audio/legacy/audio_hw.c
+++ b/audio/legacy/audio_hw.c
@@ -1143,6 +1143,8 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
in->requested_channels = popcount(config->channel_mask);
in->hw_frame_size = in->config.channels * sizeof(int16_t);
in->remix = NULL;
+ in->resampler = NULL;
+ in->buffer = NULL;
adev->in = in;
/* in-place stereo-to-mono remix since capture stream is stereo */