audiohal: Check the result from IAllocator::allocate

The code wasn't checking the return from IAllocator::allocate
resulting in a crash from HIDL framework when there was an error.

Bug: 34635658
Change-Id: Ia6146ec0be972f261d35852fdc44302b67e44898
Test: Run android.media.cts.AudioTrackTest#testPlayStreamData
1 file changed