check: don't lead fd

CID 83243 (#1 of 1): Resource leak (RESOURCE_LEAK)
6. leaked_handle: Handle variable fd going out of scope leaks the handle.
mem: don't use an unitialized pointer

When we are dumping pages on pre-dump, we know nothing about a parent
images, so we need to splice all memory to pipes and then decide which
should be dumped.

CID 83244 (#1 of 1): Uninitialized pointer read (UNINIT)
14. uninit_use: Using uninitialized value xfer.parent.