Fix opendir NULL dirp return issue

Bug: 206035991
Test: use forrest to run boottest

Change-Id: I9e77b7d6184a0ee132b8f058f7f83302c54bcb4a
(cherry picked from commit c76c1d579965d967ff99264a16342ee33ae870c6)
1 file changed