summaryrefslogtreecommitdiffstats
path: root/hal/voice_extn
diff options
context:
space:
mode:
Diffstat (limited to 'hal/voice_extn')
-rw-r--r--hal/voice_extn/compress_voip.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hal/voice_extn/compress_voip.c b/hal/voice_extn/compress_voip.c
index 841f866a..e709505e 100644
--- a/hal/voice_extn/compress_voip.c
+++ b/hal/voice_extn/compress_voip.c
@@ -335,6 +335,12 @@ static int voip_start_call(struct audio_device *adev,
if (uc_info == NULL) {
ALOGV("%s: voip usecase is added to the list", __func__);
uc_info = (struct audio_usecase *)calloc(1, sizeof(struct audio_usecase));
+
+ if (!uc_info) {
+ ALOGE("failed to allocate voip usecase mem");
+ return -ENOMEM;
+ }
+
uc_info->id = USECASE_COMPRESS_VOIP_CALL;
uc_info->type = VOIP_CALL;
if (voip_data.out_stream)