summaryrefslogtreecommitdiff
path: root/usrp2/host/lib/eth_buffer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'usrp2/host/lib/eth_buffer.cc')
-rw-r--r--usrp2/host/lib/eth_buffer.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/usrp2/host/lib/eth_buffer.cc b/usrp2/host/lib/eth_buffer.cc
index bd37061fd..e8ca05283 100644
--- a/usrp2/host/lib/eth_buffer.cc
+++ b/usrp2/host/lib/eth_buffer.cc
@@ -156,8 +156,12 @@ namespace usrp2 {
{
// if we have background thread, stop it here
- if (!d_using_tpring && d_buf)
+ if(d_buf) {
+ if (!d_using_tpring)
free(d_buf);
+ else
+ munmap(d_buf, d_buflen);
+ }
return d_ethernet->close();
}