libmedia: Fix null pointer crash in secure buffer allocation.

Add null pointer check for native_handle as it is null if
secure memory allocation fails.

Author: Vasantha Balla<vballa@codeaurora.org>

Test: fix the bug
Bug: 71053053
Merged-In: I204ca69b9808448788c83a1ae5a642618eca8973
Change-Id: I204ca69b9808448788c83a1ae5a642618eca8973
(cherry picked from commit fad26c14c7e68c3fe40bda8fd5692b8dbfac1000)
(cherry picked from commit ddd508e96da76a3e2de3d8dfef16e4d0d07fbf9b)
2 files changed