Delete a local ref in getSurface
ANativeWindow_fromSurface() provides a native-only call path to android_view_Surface_getSurface(), so we need to clean up the local reference. Bug 14087233 Change-Id: I92aa5aa492c47a0642fdcb28c717ad7f874e1ad9
This commit is contained in:
@@ -95,6 +95,7 @@ sp<Surface> android_view_Surface_getSurface(JNIEnv* env, jobject surfaceObj) {
|
||||
env->GetLongField(surfaceObj, gSurfaceClassInfo.mNativeObject));
|
||||
env->MonitorExit(lock);
|
||||
}
|
||||
env->DeleteLocalRef(lock);
|
||||
return sur;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user