propagate errors from nfs41_name_cache_create()

server_create() was ignoring the return value of nfs41_name_cache_create(), but it needs to be propagated all the way back through nfs41_server_find_or_create() to nfs41_client_create() and nfs41_client_renew()

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2011-01-06 16:05:13 -05:00
parent 81051ddce1
commit 229ec94c5c
2 changed files with 31 additions and 15 deletions

View file

@ -111,10 +111,20 @@ static int server_create(
StringCchCopyA(server->owner, NFS4_OPAQUE_LIMIT, info->owner);
InitializeSRWLock(&server->addrs.lock);
nfs41_superblock_list_init(&server->superblocks);
nfs41_name_cache_create(&server->name_cache);
*server_out = server;
status = nfs41_name_cache_create(&server->name_cache);
if (status) {
eprintf("nfs41_name_cache_create() failed with %d\n", status);
goto out_free;
}
out:
*server_out = server;
return status;
out_free:
free(server);
server = NULL;
goto out;
}
static void server_free(