[audio_core] fix use-after-free (ASAN)

This CL addresses the ASAN issues raised in MTWN-221.

Test: Build, CQ, "git-file-tidy --all" from audio_core dir,
ASAN build that confirms the defect is addressed.

MTWN-221 #done

Change-Id: I713d153b5643c4a7d51f8c785c734b8b072d4048
1 file changed