From 99422ef8c6c502d635d94438fae8ba9368de899c Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 6 Aug 2003 20:37:26 +0000 Subject: Remove an unused variable and plug a memory leak; Patrick Latifi --- sbin/modload/modload.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sbin/modload/modload.c') diff --git a/sbin/modload/modload.c b/sbin/modload/modload.c index b22cee48077..ee10be48bf0 100644 --- a/sbin/modload/modload.c +++ b/sbin/modload/modload.c @@ -1,4 +1,4 @@ -/* $OpenBSD: modload.c,v 1.40 2003/04/15 08:06:31 deraadt Exp $ */ +/* $OpenBSD: modload.c,v 1.41 2003/08/06 20:37:25 millert Exp $ */ /* $NetBSD: modload.c,v 1.30 2001/11/08 15:33:15 christos Exp $ */ /* @@ -152,7 +152,7 @@ static int verify_entry(const char *entry, char *filename) { struct nlist names[2]; - int n, len; + int n; char *s; memset(names, 0, sizeof(names)); @@ -167,6 +167,7 @@ verify_entry(const char *entry, char *filename) n = nlist(filename, names); if (n == -1) err(1, "nlist %s", filename); + free(s); return n; } -- cgit v1.2.3