From 6c4596c3bf3850288b7f114f64e2e47d975dae67 Mon Sep 17 00:00:00 2001 From: Fan Yong Date: Sat, 9 Nov 2024 00:38:57 +0800 Subject: [PATCH] DAOS-16170 chk: initialize local variable for CHK RPC Otherwise, the error handling logic may access invalid DRAM. Test-tag: test_daos_cat_recov_core Allow-unstable-test: true Signed-off-by: Fan Yong --- src/chk/chk_rpc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/chk/chk_rpc.c b/src/chk/chk_rpc.c index 84e6ae338576..e340d482cec6 100644 --- a/src/chk/chk_rpc.c +++ b/src/chk/chk_rpc.c @@ -694,7 +694,7 @@ chk_query_remote(d_rank_list_t *rank_list, uint64_t gen, int pool_nr, uuid_t poo int chk_mark_remote(d_rank_list_t *rank_list, uint64_t gen, d_rank_t rank, uint32_t version) { - crt_rpc_t *req; + crt_rpc_t *req = NULL; struct chk_mark_in *cmi; struct chk_mark_out *cmo; int rc; @@ -730,7 +730,7 @@ int chk_act_remote(d_rank_list_t *rank_list, uint64_t gen, uint64_t seq, uint32_t cla, uint32_t act, d_rank_t rank, bool for_all) { - crt_rpc_t *req; + crt_rpc_t *req = NULL; struct chk_act_in *cai; struct chk_act_out *cao; int rc; @@ -825,7 +825,7 @@ int chk_pool_start_remote(d_rank_list_t *rank_list, uint64_t gen, uuid_t uuid, uint32_t phase, uint32_t flags) { - crt_rpc_t *req; + crt_rpc_t *req = NULL; struct chk_pool_start_in *cpsi; struct chk_pool_start_out *cpso; int rc; @@ -863,7 +863,7 @@ chk_pool_mbs_remote(d_rank_t rank, uint32_t phase, uint64_t gen, uuid_t uuid, ch uint64_t seq, uint32_t flags, uint32_t mbs_nr, struct chk_pool_mbs *mbs_array, int *svc_rc, struct rsvc_hint *svc_hint) { - crt_rpc_t *req; + crt_rpc_t *req = NULL; struct chk_pool_mbs_in *cpmi; struct chk_pool_mbs_out *cpmo; int rc; @@ -908,7 +908,7 @@ int chk_report_remote(d_rank_t leader, uint64_t gen, uint32_t cla, uint32_t act, char *msg, uint32_t option_nr, uint32_t *options, uint32_t detail_nr, d_sg_list_t *details, uint64_t seq) { - crt_rpc_t *req; + crt_rpc_t *req = NULL; struct chk_report_in *cri; struct chk_report_out *cro; int rc; @@ -984,7 +984,7 @@ int chk_rejoin_remote(d_rank_t leader, uint64_t gen, d_rank_t rank, uuid_t iv_uuid, uint32_t *flags, uint32_t *pool_nr, uuid_t **pools) { - crt_rpc_t *req; + crt_rpc_t *req = NULL; struct chk_rejoin_in *cri; struct chk_rejoin_out *cro; uuid_t *tmp;