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

Commit f636479f authored by Weiyin Jiang's avatar Weiyin Jiang Committed by Gerrit - the friendly Code Review server
Browse files

hal: fix ASAN crash

Fix asan crash due to access usecase->stream.out without check type.

CRs-Fixed: 2534699
Change-Id: I24f3f86885a1949a02ba0eea230e1431a95b4713
parent 4f29891f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -8435,7 +8435,8 @@ static int platform_set_codec_backend_cfg(struct audio_device* adev,
    int controller = -1;
    int stream = -1;

    if (usecase) {
    if (usecase != NULL && usecase->stream.out &&
            usecase->type == PCM_PLAYBACK) {
        controller = usecase->stream.out->extconn.cs.controller;
        stream = usecase->stream.out->extconn.cs.stream;
    }