summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-08-06 20:37:25 +0000
committermillert <millert@openbsd.org>2003-08-06 20:37:25 +0000
commitbabf5966bdfe80ec058f58ef1b224c64a6cdfc4e (patch)
tree7af0f1346d5756f6937e6aa56aca787cdb5ee5cb
parentgetdiskbyname(3) requires <sys/types.h>; Patrick Latifi (diff)
downloadwireguard-openbsd-babf5966bdfe80ec058f58ef1b224c64a6cdfc4e.tar.xz
wireguard-openbsd-babf5966bdfe80ec058f58ef1b224c64a6cdfc4e.zip
Remove an unused variable and plug a memory leak; Patrick Latifi
-rw-r--r--sbin/modload/modload.c5
1 files changed, 3 insertions, 2 deletions
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;
}