mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
hw/sd/sdhci: free irq on exit
Fix a memory leak bug in sdhci_pci_realize() due to s->irq not being freed in sdhci_pci_exit(). Signed-off-by: Zheng Huang <hz1624917200@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <09ddf42b-a6db-42d5-954b-148d09d8d6cc@gmail.com> [PMD: Moved qemu_free_irq() call before sdhci_common_unrealize()] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
48ca224250
commit
1c2d03bb08
1 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
|||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/module.h"
|
||||
#include "hw/irq.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "hw/sd/sdhci.h"
|
||||
#include "sdhci-internal.h"
|
||||
|
@ -48,6 +49,7 @@ static void sdhci_pci_exit(PCIDevice *dev)
|
|||
{
|
||||
SDHCIState *s = PCI_SDHCI(dev);
|
||||
|
||||
qemu_free_irq(s->irq);
|
||||
sdhci_common_unrealize(s);
|
||||
sdhci_uninitfn(s);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue