Eliminate memory leak from an accidental malloc().

This commit is contained in:
Ed Maste 2007-04-10 17:37:53 +00:00
parent 57bcf75fd2
commit affde8a968

View File

@ -130,7 +130,6 @@ elf_coredump(int efd __unused, int fd, pid_t pid)
* Allocate memory for building the header, fill it up,
* and write it out.
*/
hdr = malloc(hdrsize);
if ((hdr = malloc(hdrsize)) == NULL)
errx(1, "out of memory");
elf_corehdr(fd, pid, map, seginfo.count, hdr, hdrsize);