coredump: do not free twice