From: Julia Lawall Date: Mon, 4 Jan 2010 14:21:31 +0000 (+0100) Subject: netfilter: SNMP NAT: correct the size argument to kzalloc X-Git-Tag: v2.6.34-rc1~233^2~303^2~59 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71c3ebfdb27b50dcaef38b6f70da82b9142c5fb6;p=pandora-kernel.git netfilter: SNMP NAT: correct the size argument to kzalloc obj has type struct snmp_object **, not struct snmp_object *. But indeed it is not even clear why kmalloc is needed. The memory is freed by the end of the function, so the local variable of pointer type should be sufficient. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @disable sizeof_type_expr@ type T; T **x; @@ x = <+...sizeof( - T + *x )...+> // Signed-off-by: Julia Lawall Signed-off-by: Patrick McHardy --- Reading git-diff-tree failed