From e261fcf4c6c3381691875e02549c5723ca06da7d Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Sat, 20 Jun 2015 23:38:18 +0300 Subject: [PATCH] xnu: fix use after free Found by: Coverity scan. CID: 96706 --- grub-core/loader/i386/xnu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c index e0506a676..2fe1fdc1f 100644 --- a/grub-core/loader/i386/xnu.c +++ b/grub-core/loader/i386/xnu.c @@ -269,9 +269,9 @@ grub_xnu_devprop_add_property (struct grub_xnu_devprop_device_descriptor *dev, prop->data = grub_malloc (prop->length); if (!prop->data) { - grub_free (prop); grub_free (prop->name); grub_free (prop->name16); + grub_free (prop); return grub_errno; } grub_memcpy (prop->data, data, prop->length);