]> git.neil.brown.name Git - history.git/commitdiff
[SUNRPC]: Missing NULL kmalloc check in unix_domain_find().
authorPetri T. Koistinen <petri.koistinen@iki.fi>
Mon, 26 Apr 2004 09:37:38 +0000 (02:37 -0700)
committerStephen Hemminger <shemminger@osdl.org>
Mon, 26 Apr 2004 09:37:38 +0000 (02:37 -0700)
net/sunrpc/svcauth_unix.c

index 77bcb661fbfa211ac2246a99297255efa2c3a287..082684ddf3bc828a046f43ba548d5a1bc06477b4 100644 (file)
@@ -51,6 +51,8 @@ struct auth_domain *unix_domain_find(char *name)
                return rv;
 
        new = kmalloc(sizeof(*new), GFP_KERNEL);
+       if (new == NULL)
+               return NULL;
        cache_init(&new->h.h);
        atomic_inc(&new->h.h.refcnt);
        new->h.name = strdup(name);