]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mountd/auth.c
Assorted fixes
[nfs-utils.git] / utils / mountd / auth.c
index e92138918d4b36b91201628f3e1ed884c9954910..6361fcebb13f6f1170c791ba9e65752e8416e5f6 100644 (file)
@@ -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: