apache /
kudu /
2a9250bb21c83d0522a5e1ac144e7ac15fcbed01 [Refactor] Fix a memory leak warning
The following is the warning messege:
src/kudu/consensus/quorum_util-test.cc:104:1: warning: Potential
leak of memory pointed to by 'attrs_pb._M_t._M_t._M_head_impl'
[clang-analyzer-cplusplus.NewDeleteLeaks]
src/kudu/consensus/quorum_util-test.cc:1822:3: note: Calling 'AddPeer'
AddPeer(&config, "A", V, '+', {{"REPLACE", true}});
src/kudu/consensus/quorum_util-test.cc:85:3: note: Taking true branch
if (overall_health) {
src/kudu/consensus/quorum_util-test.cc:90:7: note: Assuming the condition
is true
if (!attrs.empty()) {
src/kudu/consensus/quorum_util-test.cc:90:3: note: Taking true branch
if (!attrs.empty()) {
src/kudu/consensus/quorum_util-test.cc:91:42: note: Memory is allocated
unique_ptr<RaftPeerAttrsPB> attrs_pb(new RaftPeerAttrsPB);
src/kudu/consensus/quorum_util-test.cc:104:1: note: Potential leak of
memory pointed to by 'attrs_pb._M_t._M_t._M_head_impl'
Change-Id: Ib83a99bfa8587a834c74843e1c0dd1c8da203c21
Reviewed-on: http://gerrit.cloudera.org:8080/20784
Reviewed-by: Yingchun Lai <laiyingchun@apache.org>
Tested-by: Yingchun Lai <laiyingchun@apache.org>
1 file changed