diff options
author | Martin Wallgren <martin.wallgren@sonymobile.com> | 2014-08-20 14:58:58 +0200 |
---|---|---|
committer | Henrik Baard <henrik.baard@sonymobile.com> | 2014-11-11 12:37:29 +0100 |
commit | d865900425d9593974aac640bc4deb93865dcfbe (patch) | |
tree | 5e8163b005ffbbf8d8ddce5930310f54ad0a5e8d /core/jni/android | |
parent | 189bf05616b854f0319c7329a96e63ad374fd6c0 (diff) | |
download | frameworks_base-d865900425d9593974aac640bc4deb93865dcfbe.zip frameworks_base-d865900425d9593974aac640bc4deb93865dcfbe.tar.gz frameworks_base-d865900425d9593974aac640bc4deb93865dcfbe.tar.bz2 |
Prevent resource leak in YuvToJpegEncoder
SkWStream is never deleted before going out of scope
Change-Id: Ifdb75c18336d095b012e73b64281ec6c2fc5c3fe
Diffstat (limited to 'core/jni/android')
-rw-r--r-- | core/jni/android/graphics/YuvToJpegEncoder.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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; } /////////////////////////////////////////////////////////////////////////////// |