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

Commit 0364c87b authored by Mikhail Naganov's avatar Mikhail Naganov Committed by android-build-merger
Browse files

volume listener: check for correct effect descriptor when releasing am: 700923e3

am: 6afb304f

Change-Id: I4911e92b8d65528a88d10555cb0afa3f25920a40
parents 88304a0f 6afb304f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -768,6 +768,16 @@ static int vol_prc_lib_release(effect_handle_t handle)
    pthread_mutex_lock(&vol_listner_init_lock);
    session_id = recv_contex->session_id;
    stream_type = recv_contex->stream_type;

    if (recv_contex->desc == NULL) {
        ALOGE("%s: Got NULL descriptor, session %u, stream type %u",
                __func__, session_id, stream_type);
        if (dumping_enabled) {
            dump_list_l();
        }
        pthread_mutex_unlock(&vol_listner_init_lock);
        return status;
    }
    uuid = recv_contex->desc->uuid;

    // check if the handle/context provided is valid