diff options
-rw-r--r-- | net/sunrpc/svcauth_unix.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 177f81608cf..0d1e8fb83b9 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
@@ -53,6 +53,10 @@ struct auth_domain *unix_domain_find(char *name) | |||
53 | return NULL; | 53 | return NULL; |
54 | kref_init(&new->h.ref); | 54 | kref_init(&new->h.ref); |
55 | new->h.name = kstrdup(name, GFP_KERNEL); | 55 | new->h.name = kstrdup(name, GFP_KERNEL); |
56 | if (new->h.name == NULL) { | ||
57 | kfree(new); | ||
58 | return NULL; | ||
59 | } | ||
56 | new->h.flavour = &svcauth_unix; | 60 | new->h.flavour = &svcauth_unix; |
57 | new->addr_changes = 0; | 61 | new->addr_changes = 0; |
58 | rv = auth_domain_lookup(name, &new->h); | 62 | rv = auth_domain_lookup(name, &new->h); |