]> git.proxmox.com Git - mirror_qemu.git/commit - net/slirp.c
slirp: use exit notifier for slirp_smb_cleanup
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 12 Jul 2016 07:57:12 +0000 (09:57 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 Jul 2016 11:30:00 +0000 (13:30 +0200)
commitf6c2e66ae8c8a03d3044dc9054aa7c16e7f817ee
tree7bb48289e53e065369385257a91414bebb1e3723
parent9e32ff32995f8c18f85f20e28ef09bae4ff2e48a
slirp: use exit notifier for slirp_smb_cleanup

We would like to move back net_cleanup() at the end of main function,
like it used to be until f30dbae63a46f23116715dff8d130c, but minimum
cleanup is needed regardless at exit() time for slirp's SMB
functionality.  Use an exit notifier to call slirp_smb_cleanup.
If net_cleanup() is called first, then remove the exit notifier as it
will become a dangling pointer otherwise.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
net/slirp.c