diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2008-06-30 16:48:50 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2008-06-30 16:48:50 +0000 |
commit | a7471a6037cf0c2e4b320296036b190b9be4c27e (patch) | |
tree | 7f8fd2975be0441d8636d266cb9f87c20208fc56 | |
parent | b0df93a585b7f9d59a5f9c5f4f88f87c458ce5be (diff) |
- Free mmap buffer on close/detach.
- Fix DPRINTF while here.
-rw-r--r-- | sys/dev/usb/uvideo.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 0623b96d974..011efad5516 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.42 2008/06/26 21:00:27 mglocker Exp $ */ +/* $OpenBSD: uvideo.c,v 1.43 2008/06/30 16:48:49 mglocker Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -991,6 +991,11 @@ uvideo_vs_free_sample(struct uvideo_softc *sc) free(fb->buf, M_DEVBUF); fb->buf = NULL; } + + if (sc->sc_mmap_buffer != NULL) { + free(sc->sc_mmap_buffer, M_DEVBUF); + sc->sc_mmap_buffer = NULL; + } } usbd_status @@ -1832,7 +1837,7 @@ uvideo_reqbufs(void *v, struct v4l2_requestbuffers *rb) struct uvideo_softc *sc = v; int i, buf_size, buf_size_total; - DPRINTF(1, "%s: count=%d\n", __func__, rb->count); + DPRINTF(1, "%s: %s: count=%d\n", DEVNAME(sc), __func__, rb->count); /* limit the buffers */ if (rb->count > UVIDEO_MAX_BUFFERS) |