[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/17] hw/nios2:fix leak of fdevice tree blob
From: |
Laurent Vivier |
Subject: |
[PULL 16/17] hw/nios2:fix leak of fdevice tree blob |
Date: |
Wed, 19 Feb 2020 11:16:11 +0100 |
From: Chen Qun <address@hidden>
The device tree blob returned by load_device_tree is malloced.
We should free it after cpu_physical_memory_write().
Reported-by: Euler Robot <address@hidden>
Signed-off-by: Chen Qun <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
hw/nios2/boot.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/nios2/boot.c b/hw/nios2/boot.c
index 46b834987691..88224aa84c8b 100644
--- a/hw/nios2/boot.c
+++ b/hw/nios2/boot.c
@@ -109,6 +109,7 @@ static int nios2_load_dtb(struct nios2_boot_info bi, const
uint32_t ramsize,
}
cpu_physical_memory_write(bi.fdt, fdt, fdt_size);
+ g_free(fdt);
return fdt_size;
}
--
2.24.1
- [PULL 00/17] Trivial branch patches, Laurent Vivier, 2020/02/19
- [PULL 02/17] Report stringified errno in VFIO related errors, Laurent Vivier, 2020/02/19
- [PULL 05/17] hw/arm/xlnx-versal: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 10/17] target/i386/whpx: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 06/17] hw/m68k/next-cube: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 07/17] hw/scsi/esp: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 12/17] contrib/rdmacm-mux: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 04/17] audio/alsaaudio: Remove superfluous semicolons, Laurent Vivier, 2020/02/19
- [PULL 09/17] ui/input-barrier: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 08/17] hw/vfio/display: Remove superfluous semicolon, Laurent Vivier, 2020/02/19
- [PULL 16/17] hw/nios2:fix leak of fdevice tree blob,
Laurent Vivier <=
- [PULL 03/17] scripts/checkpatch.pl: Detect superfluous semicolon in C code, Laurent Vivier, 2020/02/19
- [PULL 11/17] tests/qtest/libqos/qgraph: Remove superfluous semicolons, Laurent Vivier, 2020/02/19
- [PULL 13/17] hw/display/qxl: Remove unneeded variable assignment, Laurent Vivier, 2020/02/19
- [PULL 17/17] hw/xtensa/xtfpga:fix leak of fdevice tree blob, Laurent Vivier, 2020/02/19
- [PULL 01/17] mailmap: Add entry for Yu-Chen Lin, Laurent Vivier, 2020/02/19
- [PULL 14/17] hw/block/pflash_cfi02: Remove unneeded variable assignment, Laurent Vivier, 2020/02/19
- [PULL 15/17] hw/net/rocker: Report unimplemented feature with qemu_log_mask(UNIMP), Laurent Vivier, 2020/02/19
- Re: [PULL 00/17] Trivial branch patches, Peter Maydell, 2020/02/20