[PATCH 6.12 33/55] coredump: fix error handling for replace_fd()