diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-08-18 17:44:05 +0400 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2016-08-22 15:20:32 +0800 |
commit | 67f3280c062d622dc077246b483702096d11dcc0 (patch) | |
tree | 7e05557c7ebd590a628e40e9b506d9a6665f66a7 /aio-posix.c | |
parent | 5f9f818ea88a013b2464563be354dd2f0f316407 (diff) |
slirp: fix segv when init failed
Since commit f6c2e66ae8c8a, slirp uses an exit notifier to call
slirp_smb_cleanup. However, if init() failed, the notifier isn't added,
and removing it will fail:
==18447== Invalid write of size 8
==18447== at 0x7EF2B5: notifier_remove (notify.c:32)
==18447== by 0x48E80C: qemu_remove_exit_notifier (vl.c:2661)
==18447== by 0x6A2187: net_slirp_cleanup (slirp.c:134)
==18447== by 0x69419D: qemu_cleanup_net_client (net.c:338)
==18447== by 0x69445B: qemu_del_net_client (net.c:401)
==18447== by 0x6A2B81: net_slirp_init (slirp.c:366)
==18447== by 0x6A4241: net_init_slirp (slirp.c:865)
==18447== by 0x695C6D: net_client_init1 (net.c:1051)
==18447== by 0x695F6E: net_client_init (net.c:1108)
==18447== by 0x696DBA: net_init_netdev (net.c:1498)
==18447== by 0x7F1F99: qemu_opts_foreach (qemu-option.c:1116)
==18447== by 0x696E60: net_init_clients (net.c:1516)
==18447== Address 0x0 is not stack'd, malloc'd or (recently) free'd
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'aio-posix.c')
0 files changed, 0 insertions, 0 deletions