diff options
author | Linus Torvalds | 2020-07-11 11:16:46 -0700 |
---|---|---|
committer | Linus Torvalds | 2020-07-11 11:16:46 -0700 |
commit | 0aea6d5c5be33ce94c16f9ab2f64de1f481f424b (patch) | |
tree | 84fce8692cd78760659764a807aa5f7fc326b8af | |
parent | 997c4431f04d8f0d6063bac3bcdceba8d939b879 (diff) | |
parent | ba8c423488974f02b538e9dc1730f0334f9b85aa (diff) |
Merge tag 'for-linus-5.8b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fix from Juergen Gross:
"Just one fix of a recent patch (double free in an error path)"
* tag 'for-linus-5.8b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen/xenbus: Fix a double free in xenbus_map_ring_pv()
-rw-r--r-- | drivers/xen/xenbus/xenbus_client.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/xen/xenbus/xenbus_client.c b/drivers/xen/xenbus/xenbus_client.c index 4f168b46fbca..786fbb7d8be0 100644 --- a/drivers/xen/xenbus/xenbus_client.c +++ b/drivers/xen/xenbus/xenbus_client.c @@ -693,10 +693,8 @@ static int xenbus_map_ring_pv(struct xenbus_device *dev, bool leaked; area = alloc_vm_area(XEN_PAGE_SIZE * nr_grefs, info->ptes); - if (!area) { - kfree(node); + if (!area) return -ENOMEM; - } for (i = 0; i < nr_grefs; i++) info->phys_addrs[i] = |