summaryrefslogtreecommitdiff
path: root/ctdb/protocol
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2019-09-23 16:11:00 +1000
committerAmitay Isaacs <amitay@samba.org>2019-10-04 05:47:35 +0000
commita8c4e7d1f6b3375e2cdac962133919cce91f7c1d (patch)
tree644e46775f05bd848fd0b15399bbc63e44d81faf /ctdb/protocol
parent33f1c9d9654fbdcb99c23f9d23c4bbe2cc596b98 (diff)
downloadsamba-a8c4e7d1f6b3375e2cdac962133919cce91f7c1d.tar.gz
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 <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/protocol')
-rw-r--r--ctdb/protocol/protocol_client.c4
1 files changed, 4 insertions, 0 deletions
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)