[PATCH 6.6 429/444] coredump: fix error handling for replace_fd()