Unverified Commit 77baaf70 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!2760 fs: lockd: avoid possible wrong NULL parameter

parents 27a2e00d 897a5812
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -275,6 +275,9 @@ static struct nsm_handle *nsm_create_handle(const struct sockaddr *sap,
{
	struct nsm_handle *new;

	if (!hostname)
		return NULL;

	new = kzalloc(sizeof(*new) + hostname_len + 1, GFP_KERNEL);
	if (unlikely(new == NULL))
		return NULL;