Просмотр исходного кода

votequorum: fix possible memory corruption

nodeid = 0 is a valide nodeid and node associated with it should
not be freed

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Fabio M. Di Nitto 14 лет назад
Родитель
Сommit
e3ba920307
1 измененных файлов с 0 добавлено и 4 удалено
  1. 0 4
      exec/votequorum.c

+ 0 - 4
exec/votequorum.c

@@ -1118,10 +1118,6 @@ static void message_handler_req_exec_votequorum_nodeinfo (
 		recalculate_quorum(allow_downgrade, by_node);
 		recalculate_quorum(allow_downgrade, by_node);
 	}
 	}
 
 
-	if (!nodeid) {
-		free(node);
-	}
-
 	if ((wait_for_all) &&
 	if ((wait_for_all) &&
 	    (!req_exec_quorum_nodeinfo->wait_for_all_status) &&
 	    (!req_exec_quorum_nodeinfo->wait_for_all_status) &&
 	    (req_exec_quorum_nodeinfo->quorate)) {
 	    (req_exec_quorum_nodeinfo->quorate)) {