commit | c0da0cb7614db9a6ba6e8f00cea4c86844bb3e22 | [log] [tgz] |
---|---|---|
author | Greg Kurz <groug@kaod.org> | Thu Oct 10 11:36:04 2019 +0200 |
committer | Greg Kurz <groug@kaod.org> | Thu Oct 10 11:36:04 2019 +0200 |
tree | 5eea5b0668aeff1c08178a88f34b632080f21c50 | |
parent | 870328335286385b5a78ba7d925b46dc5ba74d7f [diff] [blame] |
9p: Simplify error path of v9fs_device_realize_common() Make v9fs_device_unrealize_common() idempotent and use it for rollback, in order to reduce code duplication. Signed-off-by: Greg Kurz <groug@kaod.org>
diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 08e673a..6f7309f 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c
@@ -1465,6 +1465,10 @@ { LocalData *data = ctx->private; + if (!data) { + return; + } + close(data->mountfd); g_free(data); }