[Debian-ha-commits] [ocfs2-tools] 23/58: o2info: clean up useless branch in o2info_append_task()

Valentin Vidic vvidic-guest at moszumanska.debian.org
Tue Jun 20 13:40:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

vvidic-guest pushed a commit to branch upstream
in repository ocfs2-tools.

commit 90410f31d717285328d94b94d79db7cd7e2e91fb
Author: piaojun <piaojun at huawei.com>
Date:   Wed Sep 14 17:53:48 2016 +0800

    o2info: clean up useless branch in o2info_append_task()
    
    'task' will be NULL if allocating memory fails, so no need to free
    'task' in this case.
    
    Signed-off-by: Jun Piao <piaojun at huawei.com>
    Reviewed-by: Joseph Qi <joseph.qi at huawei.com>
---
 o2info/o2info.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/o2info/o2info.c b/o2info/o2info.c
index e64564a..aa4103e 100644
--- a/o2info/o2info.c
+++ b/o2info/o2info.c
@@ -348,8 +348,7 @@ static errcode_t o2info_append_task(struct o2info_operation *o2p)
 		task->o2p_task = o2p;
 		list_add_tail(&task->o2p_list, &o2info_op_task_list);
 		o2info_op_task_count++;
-	} else
-		ocfs2_free(&task);
+	}
 
 	return err;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/ocfs2-tools.git



More information about the Debian-HA-Commits mailing list