]> git.ipfire.org Git - thirdparty/grub.git/commit
xnu: Fix double free in grub_xnu_devprop_add_property()
authorAlexey Makhalov <amakhalov@vmware.com>
Wed, 8 Jul 2020 21:30:43 +0000 (21:30 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 29 Jul 2020 14:55:48 +0000 (16:55 +0200)
commit6d7a59a2a184f7af8a90a4c90d7c7b6482acc656
treef7e8edec8b2338a3d54a2214ec39b5198164f54b
parent26a8c19307f998f67dbfb784068e394c8e9c8478
xnu: Fix double free in grub_xnu_devprop_add_property()

grub_xnu_devprop_add_property() should not free utf8 and utf16 as it get
allocated and freed in the caller.

Minor improvement: do prop fields initialization after memory allocations.

Fixes: CID 292442, CID 292457, CID 292460, CID 292466
Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/loader/i386/xnu.c