Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b14a1051 authored by Greg Kaiser's avatar Greg Kaiser Committed by android-build-merger
Browse files

Merge "ndk: Avoid memory leak in failure case." into nyc-dev

am: 8b9486c6

* commit '8b9486c6':
  ndk: Avoid memory leak in failure case.

Change-Id: I34ceb2eea30440cd68c06eea1ae642f7ac337dc1
parents e72f42de 8b9486c6
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -151,6 +151,7 @@ static AMediaCodec * createAMediaCodec(const char *name, bool name_is_type, bool
            PRIORITY_FOREGROUND);
            PRIORITY_FOREGROUND);
    if (res != OK) {
    if (res != OK) {
        ALOGE("Failed to start the looper");
        ALOGE("Failed to start the looper");
        AMediaCodec_delete(mData);
        return NULL;
        return NULL;
    }
    }
    if (name_is_type) {
    if (name_is_type) {