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]
Message-ID: <CFF307C98FEABE47A452B27C06B85BB601091274@hdsmsx411.amr.corp.intel.com>
Date:	Fri, 21 Jul 2006 22:22:10 -0400
From:	"Brown, Len" <len.brown@...el.com>
To:	"Panagiotis Issaris" <takis@...umba.uhasselt.be>,
	<linux-kernel@...r.kernel.org>
Cc:	<chas@....nrl.navy.mil>, <miquel@...uba.ar>, <kkeil@...e.de>,
	<benh@...nel.crashing.org>, <video4linux-list@...hat.com>,
	<rmk+mmc@....linux.org.uk>, <Neela.Kolli@...enio.com>,
	<jgarzik@...ox.com>, <vandrove@...cvut.cz>, <adaplas@....net>,
	<thomas@...ischhofer.net>, <weissg@...nna.at>, <philb@....org>,
	<linux-pcmcia@...ts.infradead.org>, <jkmaline@...hut.fi>,
	<paulus@...ba.org>
Subject: RE: [PATCH] drivers: Conversions from kmalloc+memset to k(z|c)alloc.


>diff --git a/drivers/acpi/hotkey.c b/drivers/acpi/hotkey.c
>index 32c9d88..037d022 100644
>--- a/drivers/acpi/hotkey.c
>+++ b/drivers/acpi/hotkey.c
>@@ -246,10 +246,8 @@ static char *format_result(union acpi_ob
> {
> 	char *buf = NULL;
> 
>-	buf = (char *)kmalloc(RESULT_STR_LEN, GFP_KERNEL);
>-	if (buf)
>-		memset(buf, 0, RESULT_STR_LEN);
>-	else
>+	buf = kzalloc(RESULT_STR_LEN, GFP_KERNEL);
>+	if (!buf)
> 		goto do_fail;

Go ahead and delete the '= NULL' while you're there.

Acked-by: Len Brown <len.brown@...el.com>

thanks,
-Len
-
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