diff options
author | Anthony Liguori | 2012-03-13 19:56:13 +0100 |
---|---|---|
committer | Anthony Liguori | 2012-03-13 19:56:13 +0100 |
commit | 3e7ecd976b06fc9054a34bda093a70efae99588b (patch) | |
tree | bd4aa371069fb6709f3f8e38c157b3c3185b45b5 /slirp/udp.c | |
parent | Merge remote-tracking branch 'kraxel/usb.44' into staging (diff) | |
parent | slirp: Fix compiler warning for w64 (diff) | |
download | qemu-3e7ecd976b06fc9054a34bda093a70efae99588b.tar.gz qemu-3e7ecd976b06fc9054a34bda093a70efae99588b.tar.xz qemu-3e7ecd976b06fc9054a34bda093a70efae99588b.zip |
Merge remote-tracking branch 'kiszka/queues/slirp' into staging
* kiszka/queues/slirp:
slirp: Fix compiler warning for w64
slirp: Cleanup resources on instance removal
slirp: Remove unneeded if_queued
slirp: Fix queue walking in if_start
slirp: Prevent recursion of if_start
slirp: Keep next_m always valid
Diffstat (limited to 'slirp/udp.c')
-rw-r--r-- | slirp/udp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/slirp/udp.c b/slirp/udp.c index 5b060f397b..ced509656d 100644 --- a/slirp/udp.c +++ b/slirp/udp.c @@ -49,6 +49,14 @@ udp_init(Slirp *slirp) slirp->udb.so_next = slirp->udb.so_prev = &slirp->udb; slirp->udp_last_so = &slirp->udb; } + +void udp_cleanup(Slirp *slirp) +{ + while (slirp->udb.so_next != &slirp->udb) { + udp_detach(slirp->udb.so_next); + } +} + /* m->m_data points at ip packet header * m->m_len length ip packet * ip->ip_len length data (IPDU) |