[PATCH 6.15 46/49] coredump: fix error handling for replace_fd()