diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-01-18 22:18:48 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-01-18 22:18:48 +0000 |
commit | b3c92999b4f5788c9a75d594c3db92e9c2ea606c (patch) | |
tree | 7ae5013b25840d1b30152cc590bc766e097481d2 | |
parent | bc4e47632e3fe851e49df550e12d3c0bcfe0363d (diff) |
Don't forget to free bounce buffer data when destroying the ring
-rw-r--r-- | sys/dev/pv/xbf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index be5a7321481..8b5fad22acc 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.14 2016/12/23 12:52:12 mikeb Exp $ */ +/* $OpenBSD: xbf.c,v 1.15 2017/01/18 22:18:47 mikeb Exp $ */ /* * Copyright (c) 2016 Mike Belopuhov @@ -1185,6 +1185,11 @@ xbf_ring_destroy(struct xbf_softc *sc) sizeof(bus_dmamap_t)); sc->sc_xs_map = NULL; } + if (sc->sc_xs_bb) { + free(sc->sc_xs_bb, M_DEVBUF, sc->sc_xr_ndesc * + sizeof(struct xbf_dma_mem)); + sc->sc_xs_bb = NULL; + } xbf_dma_free(sc, &sc->sc_xr_dma); |