diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-03-29 18:05:40 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2017-04-12 22:02:39 +0200 |
commit | 941825e11424f00f9a76c944c16f677aadfe3515 (patch) | |
tree | 7dfa01cd87065c4ee79b04c8176e8b3f008cfaa7 /kernel/test_kprobes.c | |
parent | f1554b7b2c27cedee6c772dab954629987690110 (diff) |
ieee802154: ca8210: Add checks for kmalloc allocation failures
Ensure we don't end up with a null pointer dereferences by checking
for for allocation failures. Allocate by sizeof(*ptr) rather than
the type to fix checkpack warnings. Also merge multiple lines into
one line for the kmalloc call.
Detected by CoverityScan, CID#1422435 ("Dereference null return value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'kernel/test_kprobes.c')
0 files changed, 0 insertions, 0 deletions