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

Commit d55392c9 authored by Jeff Brown's avatar Jeff Brown Committed by Android Git Automerger
Browse files

am 8bd8d896: Merge "Fix possible leak in bitmap decoding." into jb-dev

* commit '8bd8d896':
  Fix possible leak in bitmap decoding.
parents 90bbf585 8bd8d896
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -317,8 +317,6 @@ static jobject doDecode(JNIEnv* env, SkStream* stream, jobject padding,
            env->SetObjectField(javaBitmap, gBitmap_layoutBoundsFieldID, layoutBounds);
        }
    }
    // detach bitmap from its autodeleter, since we want to own it now
    adb.detach();

    if (willScale) {
        // This is weird so let me explain: we could use the scale parameter
@@ -369,6 +367,9 @@ static jobject doDecode(JNIEnv* env, SkStream* stream, jobject padding,
        pr->setImmutable();
    }

    // detach bitmap from its autodeleter, since we want to own it now
    adb.detach();

    if (javaBitmap != NULL) {
        // If a java bitmap was passed in for reuse, pass it back
        return javaBitmap;