security/selinux/ss: correct size computation
authorJulia Lawall <julia@diku.dk>
Sun, 6 Dec 2009 09:16:51 +0000 (10:16 +0100)
committerJames Morris <jmorris@namei.org>
Tue, 8 Dec 2009 03:57:54 +0000 (14:57 +1100)
The size argument to kcalloc should be the size of desired structure,
not the pointer to it.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@expression@
expression *x;
@@

x =
 <+...
-sizeof(x)
+sizeof(*x)
...+>// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>

No differences found