Explorar o código

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 %!s(int64=14) %!d(string=hai) anos
pai
achega
e3ba920307
Modificáronse 1 ficheiros con 0 adicións e 4 borrados
  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);
 	}
 
-	if (!nodeid) {
-		free(node);
-	}
-
 	if ((wait_for_all) &&
 	    (!req_exec_quorum_nodeinfo->wait_for_all_status) &&
 	    (req_exec_quorum_nodeinfo->quorate)) {