dumpstate: fix double close.

fdopen takes ownership of the fd it's given, but dump_stat_from_fd
doesn't own the fd it's passed. These APIs should probably be cleaned
up to pass a unique_fd to explicitly transfer ownership, since the
caller immediately closes the fd afterwards, but until then, just dup.

Test: mma
Change-Id: Ie3a3c1b1951d6cc712850c326ca0bcfe46155a83
1 file changed