Date: Wed, 21 Jul 2010 12:30:58 +0000 (UTC) From: Kai Wang <kaiw@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r210347 - head/lib/libelf Message-ID: <201007211230.o6LCUwLI017604@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kaiw Date: Wed Jul 21 12:30:58 2010 New Revision: 210347 URL: http://svn.freebsd.org/changeset/base/210347 Log: Fix a memory leak. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/elf_update.c Modified: head/lib/libelf/elf_update.c ============================================================================== --- head/lib/libelf/elf_update.c Wed Jul 21 12:23:49 2010 (r210346) +++ head/lib/libelf/elf_update.c Wed Jul 21 12:30:58 2010 (r210347) @@ -855,11 +855,13 @@ _libelf_write_elf(Elf *e, off_t newsize) e->e_u.e_elf.e_phdr.e_phdr64 = NULL; } + free(newfile); + return (rc); error: - if (newfile) - free(newfile); + free(newfile); + return ((off_t) -1); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007211230.o6LCUwLI017604>