Commit 43ee9cad authored by Markus Elfring's avatar Markus Elfring Committed by Linus Torvalds
Browse files

ocfs2: one function call less in user_cluster_connect() after error detection

kfree() was called by user_cluster_connect() even if a previous call of
the kzalloc() function failed.

Return from this implementation directly after failure detection.
Signed-off-by: default avatarMarkus Elfring <>
Cc: Mark Fasheh <>
Cc: Joel Becker <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent bb34ed21
......@@ -1004,10 +1004,8 @@ static int user_cluster_connect(struct ocfs2_cluster_connection *conn)
BUG_ON(conn == NULL);
lc = kzalloc(sizeof(struct ocfs2_live_connection), GFP_KERNEL);
if (!lc) {
rc = -ENOMEM;
goto out;
if (!lc)
return -ENOMEM;
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