diff options
author | Renato Botelho <renato@netgate.com> | 2016-03-14 07:56:21 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-03-14 07:56:21 -0300 |
commit | a26e4b3de35515ec3eaf2eb76b001a6a502bf56c (patch) | |
tree | 66dd86f3e16db9b45f07c989e95501b6456cf6a5 /sys/kern/link_elf.c | |
parent | 7d66bf7f17e48798ec04b7a6d99daff1820e28f8 (diff) | |
parent | a64e8d254dc9ecd38594b71dcd7d53c6084c5abc (diff) | |
download | FreeBSD-src-a26e4b3de35515ec3eaf2eb76b001a6a502bf56c.zip FreeBSD-src-a26e4b3de35515ec3eaf2eb76b001a6a502bf56c.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/kern/link_elf.c')
-rw-r--r-- | sys/kern/link_elf.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index c2cceff..0293299 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -1027,10 +1027,8 @@ out: vn_close(nd.ni_vp, FREAD, td->td_ucred, td); if (error != 0 && lf != NULL) linker_file_unload(lf, LINKER_UNLOAD_FORCE); - if (shdr != NULL) - free(shdr, M_LINKER); - if (firstpage != NULL) - free(firstpage, M_LINKER); + free(shdr, M_LINKER); + free(firstpage, M_LINKER); return (error); } @@ -1092,19 +1090,13 @@ link_elf_unload_file(linker_file_t file) + (ef->object->size << PAGE_SHIFT)); } #else - if (ef->address != NULL) - free(ef->address, M_LINKER); + free(ef->address, M_LINKER); #endif - if (ef->symbase != NULL) - free(ef->symbase, M_LINKER); - if (ef->strbase != NULL) - free(ef->strbase, M_LINKER); - if (ef->ctftab != NULL) - free(ef->ctftab, M_LINKER); - if (ef->ctfoff != NULL) - free(ef->ctfoff, M_LINKER); - if (ef->typoff != NULL) - free(ef->typoff, M_LINKER); + free(ef->symbase, M_LINKER); + free(ef->strbase, M_LINKER); + free(ef->ctftab, M_LINKER); + free(ef->ctfoff, M_LINKER); + free(ef->typoff, M_LINKER); } static void |