diff options
author | 2017-01-18 22:18:47 +0000 | |
---|---|---|
committer | 2017-01-18 22:18:47 +0000 | |
commit | 90ca9957b849fa86d21e62116f2db5b73ccb97e1 (patch) | |
tree | f1d4572431aba2b96af152725ab2df2233cc461b | |
parent | Document the RI_CLEARMARGINS flag. (diff) | |
download | wireguard-openbsd-90ca9957b849fa86d21e62116f2db5b73ccb97e1.tar.xz wireguard-openbsd-90ca9957b849fa86d21e62116f2db5b73ccb97e1.zip |
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); |