]> git.proxmox.com Git - pve-qemu-kvm.git/blob - debian/patches/extra/CVE-2016-9913-9pfs-adjust-the-order-of-resource-cleanup-in-device-.patch
bump version to 2.7.1-501
[pve-qemu-kvm.git] / debian / patches / extra / CVE-2016-9913-9pfs-adjust-the-order-of-resource-cleanup-in-device-.patch
1 From 9be364d4b3bc173103bec0dc76259f40d232eb88 Mon Sep 17 00:00:00 2001
2 From: Li Qiang <liq3ea@gmail.com>
3 Date: Wed, 23 Nov 2016 13:53:34 +0100
4 Subject: [PATCH 06/12] 9pfs: adjust the order of resource cleanup in device
5 unrealize
6
7 Unrealize should undo things that were set during realize in
8 reverse order. So should do in the error path in realize.
9
10 Signed-off-by: Li Qiang <liq3ea@gmail.com>
11 Reviewed-by: Greg Kurz <groug@kaod.org>
12 Signed-off-by: Greg Kurz <groug@kaod.org>
13 ---
14 hw/9pfs/9p.c | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17 diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
18 index fc4f2cd..ced7b4c 100644
19 --- a/hw/9pfs/9p.c
20 +++ b/hw/9pfs/9p.c
21 @@ -3490,8 +3490,8 @@ int v9fs_device_realize_common(V9fsState *s, Error **errp)
22 rc = 0;
23 out:
24 if (rc) {
25 - g_free(s->ctx.fs_root);
26 g_free(s->tag);
27 + g_free(s->ctx.fs_root);
28 v9fs_path_free(&path);
29 }
30 return rc;
31 @@ -3499,8 +3499,8 @@ out:
32
33 void v9fs_device_unrealize_common(V9fsState *s, Error **errp)
34 {
35 - g_free(s->ctx.fs_root);
36 g_free(s->tag);
37 + g_free(s->ctx.fs_root);
38 }
39
40 static void __attribute__((__constructor__)) v9fs_set_fd_limit(void)
41 --
42 2.1.4
43