Index: sys/nfs/krpc_subr.c =================================================================== --- sys/nfs/krpc_subr.c +++ sys/nfs/krpc_subr.c @@ -211,8 +209,10 @@ * Validate address family. * Sorry, this is INET specific... */ - if (sa->sin_family != AF_INET) - return (EAFNOSUPPORT); + if (sa->sin_family != AF_INET) { + error = EAFNOSUPPORT; + goto out; + } /* Free at end if not null. */ nam = mhead = NULL; @@ -222,7 +222,7 @@ * Create socket and set its receive timeout. */ if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0, td->td_ucred, td))) - return error; + goto out; tv.tv_sec = 1; tv.tv_usec = 0;