]> err.no Git - linux-2.6/blobdiff - net/sunrpc/svcauth_unix.c
[SCTP]: Verify all the paths to a peer via heartbeat before using them.
[linux-2.6] / net / sunrpc / svcauth_unix.c
index 11020c0b7db50c86cd394f6984f7301d3b665b22..7e5707e2d6b678fcd00cdb439cceb3b71fee0220 100644 (file)
@@ -36,16 +36,16 @@ struct auth_domain *unix_domain_find(char *name)
 
        rv = auth_domain_lookup(name, NULL);
        while(1) {
-               if (rv != &new->h) {
-                       if (new) auth_domain_put(&new->h);
+               if (rv) {
+                       if (new && rv != &new->h)
+                               auth_domain_put(&new->h);
+
+                       if (rv->flavour != &svcauth_unix) {
+                               auth_domain_put(rv);
+                               return NULL;
+                       }
                        return rv;
                }
-               if (rv && rv->flavour != &svcauth_unix) {
-                       auth_domain_put(rv);
-                       return NULL;
-               }
-               if (rv)
-                       return rv;
 
                new = kmalloc(sizeof(*new), GFP_KERNEL);
                if (new == NULL)