am 260cb53f: am ce4fbb4d: Merge "zygote: fix memory leak when fork process"

* commit '260cb53fdb751dd6997b6b6f60a358257c4df82a':
  zygote: fix memory leak when fork process
This commit is contained in:
Elliott Hughes
2015-08-20 01:30:41 +00:00
committed by Android Git Automerger

View File

@@ -358,8 +358,8 @@ static void DetachDescriptors(JNIEnv* env, jintArray fdsToClose) {
return;
}
jsize count = env->GetArrayLength(fdsToClose);
jint *ar = env->GetIntArrayElements(fdsToClose, 0);
if (!ar) {
ScopedIntArrayRO ar(env, fdsToClose);
if (ar.get() == NULL) {
ALOGE("Bad fd array");
RuntimeAbort(env);
}