qemu-e2k/hw
Nikita Belov b1ab03af89 hw/arm/realview.c: Fix memory leak in realview_init()
Variable 'ram_lo' is allocated unconditionally, but used only in some cases.
When it is unused pointer will be lost at function exit, resulting in a
memory leak. Allocate memory for 'ram_lo' only if it is needed.

Valgrind output:
==16879== 240 bytes in 1 blocks are definitely lost in loss record 6,033 of 7,018
==16879==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16879==    by 0x33D2CE: malloc_and_trace (vl.c:2804)
==16879==    by 0x509E610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==16879==    by 0x288836: realview_init (realview.c:55)
==16879==    by 0x28988C: realview_pb_a8_init (realview.c:375)
==16879==    by 0x341426: main (vl.c:4413)

Signed-off-by: Nikita Belov <zodiac@ispras.ru>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-11 12:07:52 +00:00
..
9pfs
acpi pc: piix4_pm: init legacy PCI hotplug when running on Xen 2014-11-14 11:11:44 +00:00
alpha
arm hw/arm/realview.c: Fix memory leak in realview_init() 2014-12-11 12:07:52 +00:00
audio
block A smattering of fixes for problems that Coverity reported. 2014-11-17 17:22:03 +00:00
bt
char Several bugfixes for s390x: 2014-11-10 14:58:59 +00:00
core hmp: fix regression of HMP device_del auto-completion 2014-11-27 14:36:20 +00:00
cpu icc_bus: fix typo ICC_BRIGDE -> ICC_BRIDGE 2014-11-03 19:51:56 +03:00
cris
display cirrus: don't overflow CirrusVGAState->cirrus_bltbuf 2014-12-01 10:25:46 +01:00
dma
gpio PPC: Add MPC8XXX gpio controller 2014-11-04 23:26:12 +01:00
i2c
i386 -machine vmport=auto: Fix handling of VMWare ioport emulation for xen 2014-11-26 12:11:27 +01:00
ide hw/ide/core.c: Prevent SIGSEGV during migration 2014-11-18 17:36:14 +00:00
input
intc apic: fix incorrect handling of ExtINT interrupts wrt processor priority 2014-11-24 14:37:45 +01:00
ipack
isa
lm32
m68k
mem pc: pc-dimm: use backend alignment during address auto allocation 2014-11-23 12:12:46 +02:00
microblaze
mips mips_mipssim: fix use-after-free for filename 2014-11-17 11:41:03 +01:00
misc
moxie
net virtio-net: fix unmap leak 2014-11-28 10:29:20 +00:00
nvram fw_cfg: fix boot order bug when dynamically modified via QOM 2014-11-26 12:11:27 +01:00
openrisc
pci pcie: fix improper use of negative value 2014-11-24 20:57:11 +02:00
pci-bridge
pci-host
pcmcia
ppc spapr: Allow dynamic creation of PHB 2014-11-04 23:26:15 +01:00
s390x
scsi vhost: Fix vhostfd leak in error branch 2014-12-01 12:29:35 +00:00
sd
sh4
sparc
sparc64
ssi
timer
tpm
tricore
unicore32
usb hcd-musb: fix dereference null return value 2014-11-17 18:02:31 +01:00
virtio vhost: Fix vhostfd leak in error branch 2014-12-01 12:29:35 +00:00
watchdog
xen
xenpv
xtensa
Makefile.objs