qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/ufs: free irq on exit
@ 2025-03-29 11:47 Zheng Huang
  2025-03-29 12:21 ` Philippe Mathieu-Daudé
  2025-03-31 11:20 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 3+ messages in thread
From: Zheng Huang @ 2025-03-29 11:47 UTC (permalink / raw)
  To: qemu-devel

Hi,

This patch fixes a memory leak bug in `ufs_init_pci()`. `u->irq` is
not freed in `ufs_exit()`.

Signed-off-by: Zheng Huang <hz1624917200@gmail.com>

---
 hw/ufs/ufs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/ufs/ufs.c b/hw/ufs/ufs.c
index 1ccd6f88b6..e80e065fea 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"
 
@@ -1732,6 +1733,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);
 
-- 
2.34.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-31 11:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-29 11:47 [PATCH] hw/ufs: free irq on exit Zheng Huang
2025-03-29 12:21 ` Philippe Mathieu-Daudé
2025-03-31 11:20 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).