Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 819c0a82 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: Fix NULL pointer dereference in get acdb snd card name"

parents 0f683830 6e4faec8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2207,6 +2207,10 @@ static int platform_acdb_init(void *platform)
    }

    snd_card_name = mixer_get_name(my_data->adev->mixer);
    if (!snd_card_name) {
        ALOGE("Failed to get snd_card_name");
        goto cleanup;
    }
    snd_card_name = platform_get_snd_card_name_for_acdb_loader(snd_card_name);

    my_data->acdb_init_data.cvd_version = cvd_version;
@@ -2230,6 +2234,7 @@ static int platform_acdb_init(void *platform)
    strlcpy(my_data->snd_card_name, snd_card_name,
                                               MAX_SND_CARD_STRING_SIZE);

cleanup:
    if (cvd_version)
        free(cvd_version);
    if (!result) {