Merge "audio: fix null pointer dereferenced issue"
This commit is contained in:
commit
d92a65fe2f
|
@ -182,13 +182,13 @@ int acdb_init_v2(struct mixer *mixer)
|
|||
|
||||
/* Get Sound card name */
|
||||
snd_card_name = mixer_get_name(mixer);
|
||||
snd_card_name = platform_get_snd_card_name_for_acdb_loader(snd_card_name);
|
||||
if (!snd_card_name) {
|
||||
ALOGE("failed to allocate memory for snd_card_name");
|
||||
ALOGE("failed to get snd_card_name");
|
||||
result = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
snd_card_name = platform_get_snd_card_name_for_acdb_loader(snd_card_name);
|
||||
int key = 0;
|
||||
struct listnode *node = NULL;
|
||||
struct meta_key_list *key_info = NULL;
|
||||
|
|
|
@ -4123,7 +4123,7 @@ int platform_get_effect_config_data(snd_device_t snd_device,
|
|||
goto done;
|
||||
}
|
||||
|
||||
if(effect_config == NULL) {
|
||||
if (effect_config == NULL) {
|
||||
ALOGE("%s: Invalid effect_config", __func__);
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
|
@ -4151,6 +4151,10 @@ void platform_add_external_specific_device(snd_device_t snd_device,
|
|||
}
|
||||
|
||||
device = (struct external_specific_device *)calloc(1, sizeof(struct external_specific_device));
|
||||
if (device == NULL) {
|
||||
ALOGE("%s: memory allocation failed", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
device->usbid = strdup(usbid);
|
||||
device->acdb_id = acdb_id;
|
||||
|
|
Loading…
Reference in New Issue