Copy directory name before closedir in Zygote

We should not do closedir() before returning ent->d_name as ent is free
after closedir().

Test: adb shell am instrument -w -r -e class com.android.launcher3.ui.TaplTestsLauncher3#testDragAppIcon com.google.android.apps.nexuslauncher.tests/androidx.test.runner.AndroidJUnitRunner
Bug: 147746712
Bug: 143937733
Change-Id: I82ef70e0c5990e7b74ec58a9b47df7c770dec946
1 file changed