Fix incorrect memory validation for g_malloc*()
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-audio.c
index 7cb2a5a..33a0df2 100644 (file)
@@ -515,9 +515,6 @@ static int __bt_hf_agent_read_call_list(GVariant *reply,
        BT_DBG("Call count = %d", call_count);
 
        *call_list = g_malloc0(sizeof(bt_hf_call_list_s));
-       /* Fix : NULL_RETURNS */
-       retv_if(*call_list == NULL, BLUETOOTH_ERROR_MEMORY_ALLOCATION);
-
        (*call_list)->count = call_count;
 
        g_variant_iter_init(&iter, var_temp);
@@ -525,9 +522,6 @@ static int __bt_hf_agent_read_call_list(GVariant *reply,
                bt_hf_call_status_info_t *call_info;
 
                call_info = g_malloc0(sizeof(bt_hf_call_status_info_t));
-               /* Fix : NULL_RETURNS */
-               retv_if(call_info == NULL, BLUETOOTH_ERROR_MEMORY_ALLOCATION);
-
                call_info->number = g_strdup(num);
                call_info->direction = dir;
                call_info->status = status;