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 <evenka@codeaurora.org> Change-Id: I9b658a86e6f3bd9ee460af1f6bdb58de08842740
This commit is contained in:
parent
7a2f2c0669
commit
8987cd7a5d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue