mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
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>
This commit is contained in:
parent
8703283352
commit
c0da0cb761
3 changed files with 14 additions and 10 deletions
|
@ -1185,6 +1185,10 @@ static void proxy_cleanup(FsContext *ctx)
|
|||
{
|
||||
V9fsProxy *proxy = ctx->private;
|
||||
|
||||
if (!proxy) {
|
||||
return;
|
||||
}
|
||||
|
||||
g_free(proxy->out_iovec.iov_base);
|
||||
g_free(proxy->in_iovec.iov_base);
|
||||
if (ctx->export_flags & V9FS_PROXY_SOCK_NAME) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue