]> git.proxmox.com Git - mirror_qemu.git/commit - hw/sparc64/sun4u.c
fw_cfg: fix FW_CFG_BOOT_DEVICE update on ppc and sparc
authorGabriel L. Somlo <somlo@cmu.edu>
Mon, 8 Jun 2015 18:10:45 +0000 (14:10 -0400)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 10 Jun 2015 06:00:37 +0000 (08:00 +0200)
commit48779e501810c5046ff8af7b9cf9c99bec2928a1
tree001c2ea1184e13405c830511092399bdfbd92162
parent1edd34b638f73d39a175fbc4f9ad5c97800d7470
fw_cfg: fix FW_CFG_BOOT_DEVICE update on ppc and sparc

On ppc, sparc, and sparc64, the value of the FW_CFG_BOOT_DEVICE 16bit
fw_cfg entry is repeatedly modified from a series of callbacks, which
currently results in the previous value's dynamically allocated memory
being leaked.

This patch switches updating to the new fw_cfg_modify_i16() call, which
does not cause memory leaks.

Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/ppc/mac_newworld.c
hw/ppc/mac_oldworld.c
hw/sparc/sun4m.c
hw/sparc64/sun4u.c