diff options
author | Zheng Huang <hz1624917200@gmail.com> | 2025-03-29 19:47:19 +0800 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-31 21:32:43 +0200 |
commit | c458f9474d6574505ce9144ab1a90b951e69c1bd (patch) | |
tree | 62c967751c09b2b2038693e47132738e122e8ab7 | |
parent | 70fe5ae121ce3013ac3a29809ed86c3837ad43ee (diff) | |
download | qemu-c458f9474d6574505ce9144ab1a90b951e69c1bd.zip qemu-c458f9474d6574505ce9144ab1a90b951e69c1bd.tar.gz qemu-c458f9474d6574505ce9144ab1a90b951e69c1bd.tar.bz2 |
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>
-rw-r--r-- | hw/ufs/ufs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/ufs/ufs.c b/hw/ufs/ufs.c index 857de6e..ee13eda 100644 --- a/hw/ufs/ufs.c +++ b/hw/ufs/ufs.c @@ -25,6 +25,7 @@ #include "qapi/error.h" #include "migration/vmstate.h" #include "scsi/constants.h" +#include "hw/irq.h" #include "trace.h" #include "ufs.h" @@ -1808,6 +1809,8 @@ static void ufs_exit(PCIDevice *pci_dev) { UfsHc *u = UFS(pci_dev); + qemu_free_irq(u->irq); + qemu_bh_delete(u->doorbell_bh); qemu_bh_delete(u->complete_bh); |