Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5ab708c authored by Mykola Kondratenko's avatar Mykola Kondratenko Committed by Steve Kondik
Browse files

zygote: fix memory leak when fork process

Release memory allocated by GetIntArrayElements.

Change-Id: If7ce2a78a480e58b0376352ce438dbe51f664f3a
parent dd61a569
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
  }