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>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 31 Mar 2014 19:53:56 +0200
From:	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Ralf Baechle <ralf@...ux-mips.org>, linux-ide@...r.kernel.org,
	linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] pata_octeon_cf: fix ata_host_activate() failure handling

Add missing kfree() call to ata_host_activate() failure path.

Cc: Ralf Baechle <ralf@...ux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
---
 drivers/ata/pata_octeon_cf.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: b/drivers/ata/pata_octeon_cf.c
===================================================================
--- a/drivers/ata/pata_octeon_cf.c	2014-03-14 16:45:04.320724377 +0100
+++ b/drivers/ata/pata_octeon_cf.c	2014-03-31 18:58:44.367604046 +0200
@@ -1020,13 +1020,16 @@ static int octeon_cf_probe(struct platfo
 
 	ata_port_desc(ap, "cmd %p ctl %p", base, ap->ioaddr.ctl_addr);
 
-
 	dev_info(&pdev->dev, "version " DRV_VERSION" %d bit%s.\n",
 		 is_16bit ? 16 : 8,
 		 cf_port->is_true_ide ? ", True IDE" : "");
 
-	return ata_host_activate(host, irq, irq_handler,
-				 IRQF_SHARED, &octeon_cf_sht);
+	rv = ata_host_activate(host, irq, irq_handler,
+			       IRQF_SHARED, &octeon_cf_sht);
+	if (rv)
+		goto free_cf_port;
+
+	return 0;
 
 free_cf_port:
 	kfree(cf_port);

--
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