Commit 5bba129e authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

staging: lustre: lnet: memory corruption in selftest



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

Fixes: 8d78f0f2 ("staging: lustre: lnet: cleanup some of the > 80 line issues")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7966f2d2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;