Commit dd08d6ea authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

[PATCH] knfsd: Don't ignore kstrdup failure in rpc caches

Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 27d630ec
...@@ -53,6 +53,10 @@ struct auth_domain *unix_domain_find(char *name) ...@@ -53,6 +53,10 @@ struct auth_domain *unix_domain_find(char *name)
return NULL; return NULL;
kref_init(&new->h.ref); kref_init(&new->h.ref);
new->h.name = kstrdup(name, GFP_KERNEL); new->h.name = kstrdup(name, GFP_KERNEL);
if (new->h.name == NULL) {
kfree(new);
return NULL;
}
new->h.flavour = &svcauth_unix; new->h.flavour = &svcauth_unix;
new->addr_changes = 0; new->addr_changes = 0;
rv = auth_domain_lookup(name, &new->h); rv = auth_domain_lookup(name, &new->h);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment