msm: audio: qdsp6v2: Check return code from audio_aio_open()
When audio_aio_open() is triggered in blocking fashion, it frees audio
resources and returns error code. In the current implementation, callers
did not check the error code which can lead to dereference to freed
resources and cause system crash. Update the callers to check return
code and then return error back to application to avoid the issue. In
the meanwhile, update the audio_aio_open not to free memory for caller
and leave the caller to free the memory in error condition.
CRs-fixed: 436653
Change-Id: If4dda158cb988c5837517817b1afa0572c30696e
Signed-off-by:
Kuirong Wang <kuirongw@codeaurora.org>
Loading
Please register or sign in to comment