summaryrefslogtreecommitdiff
path: root/usrp2/host/lib/eth_buffer.cc
diff options
context:
space:
mode:
authorTom Rondeau2011-03-13 17:22:22 -0400
committerTom Rondeau2011-03-13 17:22:22 -0400
commit47a87580034ee78feb7ce5bbd3b1f9f6806d375d (patch)
tree8fab1348265de4b07f41c4e52faadf2d262b7f48 /usrp2/host/lib/eth_buffer.cc
parent5a23954a11aa028a20baa905d7bbb29fe62803f6 (diff)
downloadgnuradio-47a87580034ee78feb7ce5bbd3b1f9f6806d375d.tar.gz
gnuradio-47a87580034ee78feb7ce5bbd3b1f9f6806d375d.tar.bz2
gnuradio-47a87580034ee78feb7ce5bbd3b1f9f6806d375d.zip
Adding test to use free or munmap to USRP2 ethernet buffer.
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();
}