Skip to content

Commit 7653f6f

Browse files
Trond MyklebustTrond Myklebust
authored andcommitted
NFSv4: Ensure that nfs4_alloc_client cleans up on error.
Any pointer that was allocated through nfs_alloc_client() needs to be freed via a call to nfs_free_client(). Reported-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 12dfd08 commit 7653f6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/nfs4client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init)
7474
return clp;
7575

7676
error:
77-
kfree(clp);
77+
nfs_free_client(clp);
7878
return ERR_PTR(err);
7979
}
8080

0 commit comments

Comments
 (0)