mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-17 07:02:03 -06:00
hw/ufs: free irq on exit
Fix a memory leak bug in ufs_init_pci() due to u->irq not being freed in ufs_exit(). Signed-off-by: Zheng Huang <hz1624917200@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <43ceb427-87aa-44ee-9007-dbaecc499bba@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
70fe5ae121
commit
c458f9474d
1 changed files with 3 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "migration/vmstate.h"
|
#include "migration/vmstate.h"
|
||||||
#include "scsi/constants.h"
|
#include "scsi/constants.h"
|
||||||
|
#include "hw/irq.h"
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
#include "ufs.h"
|
#include "ufs.h"
|
||||||
|
|
||||||
|
@ -1808,6 +1809,8 @@ static void ufs_exit(PCIDevice *pci_dev)
|
||||||
{
|
{
|
||||||
UfsHc *u = UFS(pci_dev);
|
UfsHc *u = UFS(pci_dev);
|
||||||
|
|
||||||
|
qemu_free_irq(u->irq);
|
||||||
|
|
||||||
qemu_bh_delete(u->doorbell_bh);
|
qemu_bh_delete(u->doorbell_bh);
|
||||||
qemu_bh_delete(u->complete_bh);
|
qemu_bh_delete(u->complete_bh);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue