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

Commit 4e147803 authored by Greg Kaiser's avatar Greg Kaiser
Browse files

ndk: Avoid memory leak in failure case.

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