From c861f9e411378530adfd36b51a3c307aa98062da Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 18 Sep 2003 18:00:14 +0000 Subject: fix early free (subtle); marius@monkey.org --- sbin/modload/elf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin') diff --git a/sbin/modload/elf.c b/sbin/modload/elf.c index 648a76695f1..00d8b4e33b6 100644 --- a/sbin/modload/elf.c +++ b/sbin/modload/elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elf.c,v 1.5 2003/07/21 03:55:35 tedu Exp $ */ +/* $OpenBSD: elf.c,v 1.6 2003/09/18 18:00:13 deraadt Exp $ */ /* $NetBSD: elf.c,v 1.8 2002/01/03 21:45:58 jdolecek Exp $ */ /* @@ -285,10 +285,10 @@ elf_mod_sizes(int fd, size_t *modsize, int *strtablen, /* XXX round to pagesize? */ *modsize = roundup(off, sysconf(_SC_PAGESIZE)); - free(shstrtab); /* get string table length */ strtab = read_string_table(fd, head, strtablen); + free(shstrtab); free(strtab); /* get symbol table sections */ -- cgit v1.2.3