Received: from eggs.gnu.org ([2001:4830:134:3::10]:54396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDrzz-0008B4-Pm for qemu-devel@nongnu.org; Wed, 21 Jan 2015 04:54:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDrzw-0001XJ-KQ for qemu-devel@nongnu.org; Wed, 21 Jan 2015 04:54:55 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:54300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDrzw-0001X8-A8 for qemu-devel@nongnu.org; Wed, 21 Jan 2015 04:54:52 -0500 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Jan 2015 09:54:50 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 75F811B0806B for ; Wed, 21 Jan 2015 09:54:50 +0000 (GMT) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t0L9sn8q52691126 for ; Wed, 21 Jan 2015 09:54:49 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t0L9smAe009615 for ; Wed, 21 Jan 2015 02:54:48 -0700 Date: Wed, 21 Jan 2015 10:54:47 +0100 From: Cornelia Huck Message-ID: <20150121105447.37725cda.cornelia.huck@de.ibm.com> In-Reply-To: <1421747797-2762-1-git-send-email-armbru@redhat.com> References: <1421747797-2762-1-git-send-email-armbru@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] s390: Plug memory leak on s390_pci_generate_event() error path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: frank.blaschka@de.ibm.com, qemu-devel@nongnu.org On Tue, 20 Jan 2015 10:56:37 +0100 Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > 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.