From a8c4e7d1f6b3375e2cdac962133919cce91f7c1d Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Mon, 23 Sep 2019 16:11:00 +1000 Subject: ctdb-protocol: Initialise request->rdata.opcode where missing Otherwise it is uninitialised, so... ==22889== Conditional jump or move depends on uninitialised value(s) ==22889== at 0x12257B: ctdb_req_control_data_len (protocol_control.c:39) ==22889== by 0x1228E9: ctdb_req_control_len (protocol_control.c:1786) ==22889== by 0x12A51C: ctdb_client_control_send (client_control.c:101) ==22889== by 0x138BE1: ctdb_tunnel_setup_send (client_tunnel.c:100) ==22889== by 0x10EE4F: tunnel_test_send (tunnel_test.c:135) ==22889== by 0x10EE4F: main (tunnel_test.c:463) and similar. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/protocol/protocol_client.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ctdb/protocol') diff --git a/ctdb/protocol/protocol_client.c b/ctdb/protocol/protocol_client.c index 9aa32a9bba7..a461ff36016 100644 --- a/ctdb/protocol/protocol_client.c +++ b/ctdb/protocol/protocol_client.c @@ -2311,6 +2311,8 @@ void ctdb_req_control_tunnel_register(struct ctdb_req_control *request, request->srvid = tunnel_id; request->client_id = 0; request->flags = 0; + + request->rdata.opcode = CTDB_CONTROL_TUNNEL_REGISTER; } int ctdb_reply_control_tunnel_register(struct ctdb_reply_control *reply) @@ -2332,6 +2334,8 @@ void ctdb_req_control_tunnel_deregister(struct ctdb_req_control *request, request->srvid = tunnel_id; request->client_id = 0; request->flags = 0; + + request->rdata.opcode = CTDB_CONTROL_TUNNEL_DEREGISTER; } int ctdb_reply_control_tunnel_deregister(struct ctdb_reply_control *reply) -- cgit v1.2.1