Fix incorrect closing of fds.

Test: Ran unit tests without fdsan aborts.
Change-Id: I4a060739c61e93364b9aabe3ae1d6cbc3639d310
1 file changed