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 f30dbae6, 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: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Showing
想要评论请 注册 或 登录