diff options
author | emaste <emaste@FreeBSD.org> | 2007-04-10 17:37:53 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2007-04-10 17:37:53 +0000 |
commit | 56a3d8cfd377ad7cce05adf21c9f9770dc74db12 (patch) | |
tree | d71ef8be4082f2a1d858041da587da913d3be528 /usr.bin/gcore | |
parent | b159725895c2c6ab74dca42155e2a313c18b641a (diff) | |
download | FreeBSD-src-56a3d8cfd377ad7cce05adf21c9f9770dc74db12.zip FreeBSD-src-56a3d8cfd377ad7cce05adf21c9f9770dc74db12.tar.gz |
Eliminate memory leak from an accidental malloc().
Diffstat (limited to 'usr.bin/gcore')
-rw-r--r-- | usr.bin/gcore/elfcore.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/usr.bin/gcore/elfcore.c b/usr.bin/gcore/elfcore.c index 00b3286..2c27a64 100644 --- a/usr.bin/gcore/elfcore.c +++ b/usr.bin/gcore/elfcore.c @@ -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); |