From d865900425d9593974aac640bc4deb93865dcfbe Mon Sep 17 00:00:00 2001 From: Martin Wallgren Date: Wed, 20 Aug 2014 14:58:58 +0200 Subject: Prevent resource leak in YuvToJpegEncoder SkWStream is never deleted before going out of scope Change-Id: Ifdb75c18336d095b012e73b64281ec6c2fc5c3fe --- core/jni/android/graphics/YuvToJpegEncoder.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'core/jni/android') diff --git a/core/jni/android/graphics/YuvToJpegEncoder.cpp b/core/jni/android/graphics/YuvToJpegEncoder.cpp index 6591d60..9b2e4b5 100644 --- a/core/jni/android/graphics/YuvToJpegEncoder.cpp +++ b/core/jni/android/graphics/YuvToJpegEncoder.cpp @@ -236,6 +236,7 @@ static jboolean YuvImage_compressToJpeg(JNIEnv* env, jobject, jbyteArray inYuv, env->ReleaseByteArrayElements(inYuv, yuv, 0); env->ReleaseIntArrayElements(offsets, imgOffsets, 0); env->ReleaseIntArrayElements(strides, imgStrides, 0); + delete strm; return result; } /////////////////////////////////////////////////////////////////////////////// -- cgit v1.1