[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20120820161759.30323.48812.stgit@localhost.localdomain>
Date: Mon, 20 Aug 2012 20:17:59 +0400
From: Stanislav Kinsbursky <skinsbursky@...allels.com>
To: Trond.Myklebust@...app.com
Cc: bfields@...ldses.org, linux-nfs@...r.kernel.org,
linux-kernel@...r.kernel.org, devel@...nvz.org
Subject: [PATCH] NFS: free client is case of idr allocation failure
Simple kfree() is not enough, because we need to clean up the allocation of
cl_hostname, put the module and the network namespace, etc
Signed-off-by: Stanislav Kinsbursky <skinsbursky@...allels.com>
---
fs/nfs/nfs4client.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index cbcdfaf..24eb663 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -74,7 +74,7 @@ struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init)
return clp;
error:
- kfree(clp);
+ nfs_free_client(clp);
return ERR_PTR(err);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists