lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 18 Apr 2012 16:02:02 +0200
From:	Julia Lawall <Julia.Lawall@...6.fr>
To:	linux-pcmcia@...ts.infradead.org
Cc:	kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drivers/pcmcia/electra_cf.c: add missing iounmap and kfree

From: Julia Lawall <Julia.Lawall@...6.fr>

cf and cf->mem_base have been allocated at the point of this failure, so
they should be freed before leaving the function.

Signed-off-by: Julia Lawall <Julia.Lawall@...6.fr>

---
I'm not sure to understand how the call to device_init_wakeup(&ofdev->dev,
0); fits in, but there seems to be no reason why this would more
appropriate in the error case a few lines below than in the error case here.

 drivers/pcmcia/electra_cf.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c
index 7647d23..558d706 100644
--- a/drivers/pcmcia/electra_cf.c
+++ b/drivers/pcmcia/electra_cf.c
@@ -214,8 +214,10 @@ static int __devinit electra_cf_probe(struct platform_device *ofdev)
 	cf->io_size = PAGE_ALIGN(resource_size(&io));
 
 	area = __get_vm_area(cf->io_size, 0, PHB_IO_BASE, PHB_IO_END);
-	if (area == NULL)
-		return -ENOMEM;
+	if (area == NULL) {
+		status = -ENOMEM;
+		goto fail1;
+	}
 
 	cf->io_virt = (void __iomem *)(area->addr);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ