Merge "Audio: KW fixes for audio-hal"
diff --git a/hal/audio_extn/auto_hal.c b/hal/audio_extn/auto_hal.c
old mode 100644
new mode 100755
index c18b55f..1c5342f
--- a/hal/audio_extn/auto_hal.c
+++ b/hal/audio_extn/auto_hal.c
@@ -151,6 +151,11 @@
                                                 sources->ext.device.address);
         } else {
             address = (char *)calloc(1, 1);
+            if (address == NULL) {
+                ALOGE("%s: failed to get address",__func__);
+                ret = -EFAULT;
+                goto error;
+            }
         }
         parms = str_parms_create_str(address);
         if (!parms) {
@@ -185,6 +190,11 @@
                                                 sinks->ext.device.address);
         } else {
             address = (char *)calloc(1, 1);
+            if (address == NULL) {
+                ALOGE("%s: failed to get address",__func__);
+                ret = -EFAULT;
+                goto error;
+            }
         }
         parms = str_parms_create_str(address);
         if (!parms) {