diff options
author | Julia Lawall <julia@diku.dk> | 2009-08-06 22:05:18 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-08-22 14:33:22 -0700 |
commit | 5959809ded86e267c1a95fb44738a224c30d3434 (patch) | |
tree | 73cbd8c5a91c34d1df743dfc15d1cf954ed8d4fe /net/bluetooth | |
parent | 3318b2362bf0528be77123c480249663557dfbfc (diff) | |
download | kernel_samsung_tuna-5959809ded86e267c1a95fb44738a224c30d3434.zip kernel_samsung_tuna-5959809ded86e267c1a95fb44738a224c30d3434.tar.gz kernel_samsung_tuna-5959809ded86e267c1a95fb44738a224c30d3434.tar.bz2 |
Bluetooth: Add missing kmalloc NULL tests to Marvell driver
Check that the result of kmalloc is not NULL before dereferencing it.
The patch also replaces kmalloc + memset by kzalloc.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression *x;
identifier f;
constant char *C;
@@
x = \(kmalloc\|kcalloc\|kzalloc\)(...);
... when != x == NULL
when != x != NULL
when != (x || ...)
(
kfree(x)
|
f(...,C,...,x,...)
|
*f(...,x,...)
|
*x->f
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
0 files changed, 0 insertions, 0 deletions