From 8987cd7a5d53ce50989766a854b1196a7807082a Mon Sep 17 00:00:00 2001 From: Viraja Kommaraju Date: Mon, 9 Sep 2019 19:51:24 +0530 Subject: [PATCH] hal: kw fix for address pntr check in auto hal KW fix for address pointer check before usage in auto HAL. Signed-off-by: E V Ravi Change-Id: I9b658a86e6f3bd9ee460af1f6bdb58de08842740 --- hal/audio_extn/auto_hal.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) mode change 100755 => 100644 hal/audio_extn/auto_hal.c diff --git a/hal/audio_extn/auto_hal.c b/hal/audio_extn/auto_hal.c old mode 100755 new mode 100644 index 84f578f2..f156b4f0 --- a/hal/audio_extn/auto_hal.c +++ b/hal/audio_extn/auto_hal.c @@ -158,11 +158,11 @@ int auto_hal_create_audio_patch(struct audio_hw_device *dev, sources->ext.device.address); } else { address = (char *)calloc(1, 1); - if (address == NULL) { - ALOGE("%s: failed to get address",__func__); - ret = -EFAULT; - goto error; - } + } + if (address == NULL) { + ALOGE("%s: failed to get address",__func__); + ret = -EFAULT; + goto exit; } parms = str_parms_create_str(address); if (!parms) { @@ -197,11 +197,11 @@ int auto_hal_create_audio_patch(struct audio_hw_device *dev, sinks->ext.device.address); } else { address = (char *)calloc(1, 1); - if (address == NULL) { - ALOGE("%s: failed to get address",__func__); - ret = -EFAULT; - goto error; - } + } + if (address == NULL) { + ALOGE("%s: failed to get address",__func__); + ret = -EFAULT; + goto exit; } parms = str_parms_create_str(address); if (!parms) {