Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc1cc6c4 authored by Chuck Lever's avatar Chuck Lever Committed by J. Bruce Fields
Browse files

NSM: Remove NULL pointer check from nsm_find()



The nsm_find() function should never be called with a NULL IP address
pointer.  If it is, that's a bug.

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 5cf1c4b1
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -224,9 +224,6 @@ struct nsm_handle *nsm_find(const struct sockaddr *sap, const size_t salen,
	struct nsm_handle *nsm = NULL;
	struct nsm_handle *pos;

	if (!sap)
		return NULL;

	if (hostname && memchr(hostname, '/', hostname_len) != NULL) {
		if (printk_ratelimit()) {
			printk(KERN_WARNING "Invalid hostname \"%.*s\" "