Revert "libmedia: Fix null pointer crash in secure buffer allocation."

This reverts commit ddd508e96da76a3e2de3d8dfef16e4d0d07fbf9b.

Change-Id: I68ed440fe9ea775fe30683b85e618dff68e4766d
(cherry picked from commit 4b84f2fc1e7643d8bc223f0eba0db8f06be2e6b2)
diff --git a/media/libmedia/omx/1.0/WOmxNode.cpp b/media/libmedia/omx/1.0/WOmxNode.cpp
index 2cd8b76..0b40e8d 100644
--- a/media/libmedia/omx/1.0/WOmxNode.cpp
+++ b/media/libmedia/omx/1.0/WOmxNode.cpp
@@ -151,8 +151,7 @@
                     hidl_handle const& outNativeHandle) {
                 fnStatus = toStatusT(status);
                 *buffer = outBuffer;
-                *native_handle = outNativeHandle.getNativeHandle() == nullptr ?
-                        nullptr : NativeHandle::create(
+                *native_handle = NativeHandle::create(
                         native_handle_clone(outNativeHandle), true);
             }));
     return transStatus == NO_ERROR ? fnStatus : transStatus;
diff --git a/media/libstagefright/omx/1.0/WOmxNode.cpp b/media/libstagefright/omx/1.0/WOmxNode.cpp
index 1dc7c7b..9f82283 100644
--- a/media/libstagefright/omx/1.0/WOmxNode.cpp
+++ b/media/libstagefright/omx/1.0/WOmxNode.cpp
@@ -154,8 +154,7 @@
                     hidl_handle const& outNativeHandle) {
                 fnStatus = toStatusT(status);
                 *buffer = outBuffer;
-                *native_handle = outNativeHandle.getNativeHandle() == nullptr ?
-                        nullptr : NativeHandle::create(
+                *native_handle = NativeHandle::create(
                         native_handle_clone(outNativeHandle), true);
             }));
     return transStatus == NO_ERROR ? fnStatus : transStatus;