9pfs: adjust the order of resource cleanup in device unrealize
PATCH 1/1 9pfs: adjust the order of resource cleanup in device unrealize
From: Li Qiang <[email protected]>
Unrealize should undo things that were set during realize in reverse order. This is what this patch does.
Signed-off-by Li Qiang <[email protected]>
--- hw/9pfs/9p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/9pfs/9p.c +1 -1
@@ -3530,8 +3530,8 @@ out:void v9fs_device_unrealize_common (V9fsState *s,Error **errp) { -g_free (s->ctx.fs_root);g_free (s->tag); +g_free (s->ctx.fs_root); } typedef struct VirtfsCoResetData {
Signature · 1 line
1.8.3.1
Hi Li,
Please incorporate this patch in your cleanup series since it depends on it.
Quoted 5 lines · On Mon, 14 Nov 2016 20:38:57 -0500 Li Qiang <[email protected]> wrote:
From: Li Qiang <[email protected]>
Unrealize should undo things that were set during realize in reverse order. This is what this patch does.
So should do the error path in realize actually. :)
Quoted 19 lines
Signed-off-by Li Qiang <[email protected]>--- hw/9pfs/9p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/9pfs/9p.c +1
-1@@ -3530,8 +3530,8 @@ out:void v9fs_device_unrealize_common (V9fsState *s,Error **errp) { -g_free (s->ctx.fs_root);g_free (s->tag); +g_free (s->ctx.fs_root); } typedef struct VirtfsCoResetData {