diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-02-18 15:02:20 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-02-18 15:02:20 +0000 |
commit | 50917fa16aa1984295be080d195792ef8b660b2a (patch) | |
tree | 7e5f60e4ccc587fe35606ba1783b4edb5587ca68 /host/start-vm | |
parent | 2ffe51292790748f9d9983f4ffa8c66846a9eebe (diff) | |
download | spectrum-50917fa16aa1984295be080d195792ef8b660b2a.tar spectrum-50917fa16aa1984295be080d195792ef8b660b2a.tar.gz spectrum-50917fa16aa1984295be080d195792ef8b660b2a.tar.bz2 spectrum-50917fa16aa1984295be080d195792ef8b660b2a.tar.lz spectrum-50917fa16aa1984295be080d195792ef8b660b2a.tar.xz spectrum-50917fa16aa1984295be080d195792ef8b660b2a.tar.zst spectrum-50917fa16aa1984295be080d195792ef8b660b2a.zip |
host/start-vm; check exit_listener_setup failure
If we know ahead of time we won't be able to cleanup after ourselves, it's probably better to fail early.
Diffstat (limited to 'host/start-vm')
-rw-r--r-- | host/start-vm/net.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/host/start-vm/net.c b/host/start-vm/net.c index ef0c1ea..f03b80f 100644 --- a/host/start-vm/net.c +++ b/host/start-vm/net.c @@ -184,7 +184,8 @@ struct net_config net_setup(const char *router_vm_name) // Set up a process that will listen for this process dying, // and remove the interface from the netvm, and delete the // bridge. - exit_listener_setup(router_vm_name, router_vm_net_device); + if (exit_listener_setup(router_vm_name, router_vm_net_device) == -1) + goto fail_bridge; goto out; |