1
0
Fork 0

staging: lustre: lnet: memory corruption in selftest

We want sizeof(struct lstcon_node) but instead we're getting the sizeof
a pointer.

Fixes: 8d78f0f2ba ("staging: lustre: lnet: cleanup some of the > 80 line issues")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Dan Carpenter 2016-11-24 14:10:39 +03:00 committed by Greg Kroah-Hartman
parent 7966f2d22e
commit 5bba129eaa
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ lstcon_node_find(lnet_process_id_t id, struct lstcon_node **ndpp, int create)
if (!create)
return -ENOENT;
LIBCFS_ALLOC(*ndpp, sizeof(*ndpp) + sizeof(*ndl));
LIBCFS_ALLOC(*ndpp, sizeof(**ndpp) + sizeof(*ndl));
if (!*ndpp)
return -ENOMEM;