media: Silence an analyzer complaint; clean up code

The static analyzer is complaining about a memory leak when we create
this unique pointer. This appears to just be a case of the analyzer not
properly modelling returned temporaries.

While I'm in the area, unique_ptr<T, decltype(free)> is generally an
antipattern: if we instead use an empty struct with an attached
operator(), the unique_ptr shrinks to sizeof(void *) bytes (instead of
sizeof(void *) * 2), and the compiler no longer has to indirectly call
free().

As luck would have it, this small refactor makes the analyzer stop
complaining about this code.

Bug: None
Test: Ran the static analyzer. It's happier, and this builds.
Change-Id: I0c98860e2169ceb8e9d21e577cad89d1ef2c6ff9
diff --git a/core/jni/android_media_AudioAttributes.h b/core/jni/android_media_AudioAttributes.h
index c558352..628f7e3 100644
--- a/core/jni/android_media_AudioAttributes.h
+++ b/core/jni/android_media_AudioAttributes.h
@@ -27,7 +27,11 @@
 class JNIAudioAttributeHelper
 {
 public:
-    using UniqueAaPtr = std::unique_ptr<audio_attributes_t, decltype(free)*>;
+    struct FreeDeleter {
+        void operator()(void *p) const { ::free(p); }
+    };
+
+    using UniqueAaPtr = std::unique_ptr<audio_attributes_t, FreeDeleter>;
 
     /**
      * @brief makeUnique helper to prevent leak