diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-12-12 20:09:29 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-12-12 20:09:29 +0000 |
commit | defb7610355080ceba80e2edb026199b1b00abb4 (patch) | |
tree | 1d24fb6992d7da85bd2be4b9c4b8b2e6739417fe /libexec/ld.so/ldconfig | |
parent | 20a03a1930fdecc80cfda559c3bb08094c7e2a82 (diff) |
Remove NULL-checks before free(). ok tb@
Diffstat (limited to 'libexec/ld.so/ldconfig')
-rw-r--r-- | libexec/ld.so/ldconfig/prebind.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libexec/ld.so/ldconfig/prebind.c b/libexec/ld.so/ldconfig/prebind.c index d38398ab0b1..31e5fe6d412 100644 --- a/libexec/ld.so/ldconfig/prebind.c +++ b/libexec/ld.so/ldconfig/prebind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: prebind.c,v 1.31 2015/10/14 17:29:44 tobias Exp $ */ +/* $OpenBSD: prebind.c,v 1.32 2015/12/12 20:09:28 mmcc Exp $ */ /* * Copyright (c) 2006 Dale Rahn <drahn@dalerahn.com> * @@ -712,14 +712,11 @@ void elf_free_object(struct elf_object *object) { free(object->load_name); - if (object->dyn.hash != NULL) - free(object->dyn.hash); + free(object->dyn.hash); free((void *)object->dyn.strtab); free((void *)object->dyn.symtab); - if (object->dyn.rel != NULL) - free(object->dyn.rel); - if (object->dyn.rela != NULL) - free(object->dyn.rela); + free(object->dyn.rel); + free(object->dyn.rela); if (object->dyn.rpath != NULL) free((void *)object->dyn.rpath); free(object); |