* [Qemu-devel] [PATCH] s390: Plug memory leak on s390_pci_generate_event() error path
@ 2015-01-20 9:56 Markus Armbruster
2015-01-20 10:07 ` Paolo Bonzini
2015-01-21 9:54 ` Cornelia Huck
0 siblings, 2 replies; 3+ messages in thread
From: Markus Armbruster @ 2015-01-20 9:56 UTC (permalink / raw)
To: qemu-devel; +Cc: cornelia.huck, frank.blaschka
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
hw/s390x/s390-pci-bus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 1201b8d..d25ac74 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -187,7 +187,7 @@ S390PCIBusDevice *s390_pci_find_dev_by_fh(uint32_t fh)
static void s390_pci_generate_event(uint8_t cc, uint16_t pec, uint32_t fh,
uint32_t fid, uint64_t faddr, uint32_t e)
{
- SeiContainer *sei_cont = g_malloc0(sizeof(SeiContainer));
+ SeiContainer *sei_cont;
S390pciState *s = S390_PCI_HOST_BRIDGE(
object_resolve_path(TYPE_S390_PCI_HOST_BRIDGE, NULL));
@@ -195,6 +195,7 @@ static void s390_pci_generate_event(uint8_t cc, uint16_t pec, uint32_t fh,
return;
}
+ sei_cont = g_malloc0(sizeof(SeiContainer));
sei_cont->fh = fh;
sei_cont->fid = fid;
sei_cont->cc = cc;
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] s390: Plug memory leak on s390_pci_generate_event() error path
2015-01-20 9:56 [Qemu-devel] [PATCH] s390: Plug memory leak on s390_pci_generate_event() error path Markus Armbruster
@ 2015-01-20 10:07 ` Paolo Bonzini
2015-01-21 9:54 ` Cornelia Huck
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2015-01-20 10:07 UTC (permalink / raw)
To: Markus Armbruster, qemu-devel; +Cc: cornelia.huck, frank.blaschka
On 20/01/2015 10:56, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> hw/s390x/s390-pci-bus.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
> index 1201b8d..d25ac74 100644
> --- a/hw/s390x/s390-pci-bus.c
> +++ b/hw/s390x/s390-pci-bus.c
> @@ -187,7 +187,7 @@ S390PCIBusDevice *s390_pci_find_dev_by_fh(uint32_t fh)
> static void s390_pci_generate_event(uint8_t cc, uint16_t pec, uint32_t fh,
> uint32_t fid, uint64_t faddr, uint32_t e)
> {
> - SeiContainer *sei_cont = g_malloc0(sizeof(SeiContainer));
> + SeiContainer *sei_cont;
> S390pciState *s = S390_PCI_HOST_BRIDGE(
> object_resolve_path(TYPE_S390_PCI_HOST_BRIDGE, NULL));
>
> @@ -195,6 +195,7 @@ static void s390_pci_generate_event(uint8_t cc, uint16_t pec, uint32_t fh,
> return;
> }
>
> + sei_cont = g_malloc0(sizeof(SeiContainer));
> sei_cont->fh = fh;
> sei_cont->fid = fid;
> sei_cont->cc = cc;
>
A patch for this had been sent already, though I prefer yours.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] s390: Plug memory leak on s390_pci_generate_event() error path
2015-01-20 9:56 [Qemu-devel] [PATCH] s390: Plug memory leak on s390_pci_generate_event() error path Markus Armbruster
2015-01-20 10:07 ` Paolo Bonzini
@ 2015-01-21 9:54 ` Cornelia Huck
1 sibling, 0 replies; 3+ messages in thread
From: Cornelia Huck @ 2015-01-21 9:54 UTC (permalink / raw)
To: Markus Armbruster; +Cc: frank.blaschka, qemu-devel
On Tue, 20 Jan 2015 10:56:37 +0100
Markus Armbruster <armbru@redhat.com> wrote:
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> hw/s390x/s390-pci-bus.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
> index 1201b8d..d25ac74 100644
> --- a/hw/s390x/s390-pci-bus.c
> +++ b/hw/s390x/s390-pci-bus.c
> @@ -187,7 +187,7 @@ S390PCIBusDevice *s390_pci_find_dev_by_fh(uint32_t fh)
> static void s390_pci_generate_event(uint8_t cc, uint16_t pec, uint32_t fh,
> uint32_t fid, uint64_t faddr, uint32_t e)
> {
> - SeiContainer *sei_cont = g_malloc0(sizeof(SeiContainer));
> + SeiContainer *sei_cont;
> S390pciState *s = S390_PCI_HOST_BRIDGE(
> object_resolve_path(TYPE_S390_PCI_HOST_BRIDGE, NULL));
>
> @@ -195,6 +195,7 @@ static void s390_pci_generate_event(uint8_t cc, uint16_t pec, uint32_t fh,
> return;
> }
>
> + sei_cont = g_malloc0(sizeof(SeiContainer));
> sei_cont->fh = fh;
> sei_cont->fid = fid;
> sei_cont->cc = cc;
Applied to my s390-next branch.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-21 9:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 9:56 [Qemu-devel] [PATCH] s390: Plug memory leak on s390_pci_generate_event() error path Markus Armbruster
2015-01-20 10:07 ` Paolo Bonzini
2015-01-21 9:54 ` Cornelia Huck
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).