]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb:client: Initialize structs and pointers in ctdb_ctrl_(en|dis)able_node()
authorAndreas Schneider <asn@samba.org>
Tue, 14 Dec 2021 14:38:45 +0000 (15:38 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 15 Dec 2021 19:32:30 +0000 (19:32 +0000)
Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
ctdb/client/client_control_sync.c

index e9f97dd0f30fcd85ea86470471a534660308f13a..1459dc09b46067c0ac4dc64e7da5e7f39346d1ed 100644 (file)
@@ -2667,8 +2667,10 @@ int ctdb_ctrl_disable_node(TALLOC_CTX *mem_ctx,
                           int destnode,
                           struct timeval timeout)
 {
-       struct ctdb_req_control request;
-       struct ctdb_reply_control *reply;
+       struct ctdb_req_control request = {
+               .opcode = 0,
+       };
+       struct ctdb_reply_control *reply = NULL;
        int ret;
 
        ctdb_req_control_disable_node(&request);
@@ -2701,8 +2703,10 @@ int ctdb_ctrl_enable_node(TALLOC_CTX *mem_ctx,
                          int destnode,
                          struct timeval timeout)
 {
-       struct ctdb_req_control request;
-       struct ctdb_reply_control *reply;
+       struct ctdb_req_control request = {
+               .opcode = 0,
+       };
+       struct ctdb_reply_control *reply = NULL;
        int ret;
 
        ctdb_req_control_enable_node(&request);