X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmountd%2Fauth.c;h=6361fcebb13f6f1170c791ba9e65752e8416e5f6;hp=e92138918d4b36b91201628f3e1ed884c9954910;hb=317522198e1493fe0f1b10614ff2f3a582a9aaff;hpb=1275be70ca6cd6c4bec07a3381f7b510086c5526 diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c index e921389..6361fce 100644 --- a/utils/mountd/auth.c +++ b/utils/mountd/auth.c @@ -114,13 +114,12 @@ auth_authenticate_internal(char *what, struct sockaddr_in *caller, *error = not_exported; return NULL; } - - if (!(exp->m_export.e_flags & NFSEXP_INSECURE_PORT) && + } + if (!(exp->m_export.e_flags & NFSEXP_INSECURE_PORT) && (ntohs(caller->sin_port) < IPPORT_RESERVED/2 || ntohs(caller->sin_port) >= IPPORT_RESERVED)) { - *error = illegal_port; - return NULL; - } + *error = illegal_port; + return NULL; } *error = success; @@ -167,7 +166,6 @@ auth_authenticate(char *what, struct sockaddr_in *caller, char *path) if (p == epath) p++; *p = '\0'; } - free(hp); switch (error) { case bad_path: