lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20150217071424.GA9582@devel.8.8.4.4>
Date:	Tue, 17 Feb 2015 16:14:24 +0900
From:	Daeseok Youn <daeseok.youn@...il.com>
To:	mfasheh@...e.com, akpm@...ux-foundation.org
Cc:	jlbec@...lplan.org, ocfs2-devel@....oracle.com,
	linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] ocfs2: remove unneeded 'rc' for kfree()

If kzalloc() is failed, just goto 'out' label and
'out_free' label doesn't need to check 'rc' variable.

Signed-off-by: Daeseok Youn <daeseok.youn@...il.com>
---
 fs/ocfs2/stack_o2cb.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c
index 813d726..46ab104 100644
--- a/fs/ocfs2/stack_o2cb.c
+++ b/fs/ocfs2/stack_o2cb.c
@@ -347,7 +347,7 @@ static int o2cb_cluster_connect(struct ocfs2_cluster_connection *conn)
 	priv = kzalloc(sizeof(struct o2dlm_private), GFP_KERNEL);
 	if (!priv) {
 		rc = -ENOMEM;
-		goto out_free;
+		goto out;
 	}
 
 	/* This just fills the structure in.  It is safe to pass conn. */
@@ -376,8 +376,7 @@ static int o2cb_cluster_connect(struct ocfs2_cluster_connection *conn)
 	dlm_register_eviction_cb(dlm, &priv->op_eviction_cb);
 
 out_free:
-	if (rc)
-		kfree(conn->cc_private);
+	kfree(conn->cc_private);
 
 out:
 	return rc;
-- 
1.7.1

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ