aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index 356713ea07..d3ec5320ea 100644
--- a/vl.c
+++ b/vl.c
@@ -4345,9 +4345,6 @@ int main(int argc, char **argv, char **envp)
qemu_opts_del(icount_opts);
}
- /* clean up network at qemu process termination */
- atexit(&net_cleanup);
-
if (default_net) {
QemuOptsList *net = qemu_find_opts("net");
qemu_opts_set(net, NULL, "type", "nic", &error_abort);
@@ -4611,5 +4608,9 @@ int main(int argc, char **argv, char **envp)
tpm_cleanup();
#endif
+ /* vhost-user must be cleaned up before chardevs. */
+ net_cleanup();
+ qemu_chr_cleanup();
+
return 0;
}