when using valgrind to test the command "query memdev", I had
found some memory leaks. the test result:
==13802== 4 bytes in 1 blocks are definitely lost in loss record 125 of 8,508
==13802==at 0x4A08934: malloc (vg_replace_malloc.c:291)
==13802==by 0x4A08AA8: realloc (vg_replace_malloc.c:
There are several memory leaks in QEMU which are caused by calling
qemu_allocate_irqs.
Some of these leaks are fixed here in the 2nd and 3rd patch.
More can be fixed using the same pattern.
The first patch adds a new function which avoids unnecessary
memory allocation.
[PATCH 1/3] irq: Add new f
Valgrind reports lots of memory leaks. Three of them which occur
very often are fixed here.
[PATCH 1/3] qdev: Fix memory leak in function set_pci_devfn
[PATCH 2/3] qom: Fix memory leak in function container_get
[PATCH 3/3] hw/pc_sysfw: Fix memory leak
Regards,
Stefan Weil