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
| ||
|
Date: Mon, 26 Sep 2016 17:40:04 +0200 From: SF Markus Elfring <elfring@...rs.sourceforge.net> To: gigaset307x-common@...ts.sourceforge.net, netdev@...r.kernel.org, Karsten Keil <isdn@...ux-pingi.de>, Paul Bolle <pebolle@...cali.nl> Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org, Julia Lawall <julia.lawall@...6.fr> Subject: [PATCH 2/5] ISDN-Gigaset: Improve another size determination in gigaset_initcs() From: Markus Elfring <elfring@...rs.sourceforge.net> Date: Sun, 25 Sep 2016 22:32:14 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net> --- drivers/isdn/gigaset/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index cecbb6a..f505b42 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c @@ -710,7 +710,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, cs->mode = M_UNKNOWN; cs->mstate = MS_UNINITIALIZED; cs->bcs = kmalloc_array(channels, sizeof(*cs->bcs), GFP_KERNEL); - cs->inbuf = kmalloc(sizeof(struct inbuf_t), GFP_KERNEL); + cs->inbuf = kmalloc(sizeof(*cs->inbuf), GFP_KERNEL); if (!cs->bcs || !cs->inbuf) { pr_err("out of memory\n"); goto error; -- 2.10.0
Powered by blists - more mailing lists