summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-12-01 16:58:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-12-01 16:58:49 +0000
commit2c4611cb70f1b3e2802e600c129cefcee86b0dcc (patch)
tree0ace7abd14459306d53a74548589e612f5b80fa8 /sys/dev
parent4fffbd14bc03746b7ef02fc8c8132fcc5d37434b (diff)
leak memory in the realloc function until we find out who has a pointer
to it, otherwise as seen by sthen/matthieu in master mode: cdcef0 at usbf0: usbf_open_pipe failed ok miod
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/usbf_subr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/usb/usbf_subr.c b/sys/dev/usb/usbf_subr.c
index 87b145ec2cc..61ee9013d87 100644
--- a/sys/dev/usb/usbf_subr.c
+++ b/sys/dev/usb/usbf_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbf_subr.c,v 1.13 2008/06/10 20:50:19 miod Exp $ */
+/* $OpenBSD: usbf_subr.c,v 1.14 2008/12/01 16:58:48 deraadt Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -88,8 +88,11 @@ usbf_realloc(void **pp, size_t *sizep, size_t newsize)
oldsize = MIN(*sizep, newsize);
if (oldsize > 0)
bcopy(*pp, p, oldsize);
+#if 0
+ /* XXX must leak for now; something unknown has a pointer */
if (*pp != NULL)
free(*pp, M_USB);
+#endif
*pp = p;
*sizep = newsize;
return p;