diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-17 17:11:08 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-17 17:11:08 +0000 |
commit | b946a1533209f61a93e34898aebb5b43154b99c3 (patch) | |
tree | 36b0017910ca42cc5a41671b8edc7faa5da0a452 /net.h | |
parent | 32a8f6ae93f175518f86f99249177c35d1a85114 (diff) | |
download | qemu-b946a1533209f61a93e34898aebb5b43154b99c3.zip qemu-b946a1533209f61a93e34898aebb5b43154b99c3.tar.gz qemu-b946a1533209f61a93e34898aebb5b43154b99c3.tar.bz2 |
Introduce VLANClientState::cleanup() (Mark McLoughlin)
We're currently leaking memory and file descriptors on device
hot-unplug.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7150 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'net.h')
-rw-r--r-- | net.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -9,6 +9,7 @@ typedef ssize_t (IOReadvHandler)(void *, const struct iovec *, int); typedef struct VLANClientState VLANClientState; +typedef void (NetCleanup) (VLANClientState *); typedef void (LinkStatusChanged)(VLANClientState *); struct VLANClientState { @@ -17,6 +18,7 @@ struct VLANClientState { /* Packets may still be sent if this returns zero. It's used to rate-limit the slirp code. */ IOCanRWHandler *fd_can_read; + NetCleanup *cleanup; LinkStatusChanged *link_status_changed; int link_down; void *opaque; @@ -40,6 +42,7 @@ VLANClientState *qemu_new_vlan_client(VLANState *vlan, const char *name, IOReadHandler *fd_read, IOCanRWHandler *fd_can_read, + NetCleanup *cleanup, void *opaque); void qemu_del_vlan_client(VLANClientState *vc); VLANClientState *qemu_find_vlan_client(VLANState *vlan, void *opaque); |