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:
Andy McFadden
2014-06-11 15:22:32 -07:00
parent f89fa83374
commit 5ad3ab8a16

View File

@@ -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;
}