summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordhill <dhill@openbsd.org>2006-03-18 03:34:22 +0000
committerdhill <dhill@openbsd.org>2006-03-18 03:34:22 +0000
commitd2fda68c0de5842d087587f48edc68b74bb973c8 (patch)
tree40f1eac0157a2e1bfa013e36baf47f15f1d29727
parentChange code to match comments, fixing potential off-by-one error. (diff)
downloadwireguard-openbsd-d2fda68c0de5842d087587f48edc68b74bb973c8.tar.xz
wireguard-openbsd-d2fda68c0de5842d087587f48edc68b74bb973c8.zip
Plug a memleak
ok ray@ "Wow, no kidding." deraaadt@
-rw-r--r--lib/libusbhid/usage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libusbhid/usage.c b/lib/libusbhid/usage.c
index eea8df4e9eb..cffa7005290 100644
--- a/lib/libusbhid/usage.c
+++ b/lib/libusbhid/usage.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usage.c,v 1.7 2005/02/10 22:24:52 matthieu Exp $ */
+/* $OpenBSD: usage.c,v 1.8 2006/03/18 03:34:22 dhill Exp $ */
/* $NetBSD: usage.c,v 1.1 2001/12/28 17:45:27 augustss Exp $ */
/*
@@ -185,7 +185,7 @@ hid_start(const char *hidname)
fail:
if (f)
fclose(f);
- for (no = 0; no++; no < npages) {
+ for (no = 0; no < npages; no++) {
if (pages[no].name)
free((char *)pages[no].name);
if (pages[no].page_contents)