]> git.ipfire.org Git - thirdparty/qemu.git/commit
arm/boot: Free dtb blob memory after use
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 25 Jun 2013 17:34:13 +0000 (18:34 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 12 Aug 2013 19:44:19 +0000 (14:44 -0500)
commit4bf0901ff883c805adce6f7f159128b4aa993f65
treebd70b3b44c0413008073b14bbcea3412f2390c04
parent717086d0e899c388e3f544ad0954131b69d804d1
arm/boot: Free dtb blob memory after use

The dtb blob returned by load_device_tree() is in memory allocated
with g_malloc(). Free it accordingly once we have copied its
contents into the guest memory. To make this easy, we need also to
clean up the error handling in load_dtb() so that we consistently
handle errors in the same way (by printing a message and then
returning -1, rather than either plowing on or exiting immediately).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Message-id: 1371209256-11408-1-git-send-email-peter.maydell@linaro.org
(cherry picked from commit c23045ded7571f0eaad95920ab00b6bc9c3a91e6)

Conflicts:

hw/arm/boot.c

* updated to include #ifdef for CONFIG_FDT

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/arm/boot.c