Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7653f6ff authored by Trond Myklebust's avatar Trond Myklebust
Browse files

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: default avatarStanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 12dfd080
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -74,7 +74,7 @@ struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init)
	return clp;
	return clp;


error:
error:
	kfree(clp);
	nfs_free_client(clp);
	return ERR_PTR(err);
	return ERR_PTR(err);
}
}