提交 7cfa74d1 编写于 作者: S Sachin Kamat 提交者: Linus Torvalds

ocfs2/dlm: remove redundant null pointer check

kfree on a NULL pointer is a no-op.  Remove the redundant null pointer
check.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Acked-by: NMark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 7f4804d4
...@@ -1498,10 +1498,8 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data, ...@@ -1498,10 +1498,8 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data,
dlm_put(dlm); dlm_put(dlm);
if (ret < 0) { if (ret < 0) {
if (buf) kfree(buf);
kfree(buf); kfree(item);
if (item)
kfree(item);
mlog_errno(ret); mlog_errno(ret);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册