Wang Xixu has uploaded this change for review. (
http://gerrit.cloudera.org:8080/20784
Change subject: [Refactor] Fix a memory leak warning
......................................................................
[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
---
M src/kudu/consensus/quorum_util-test.cc
1 file changed, 3 insertions(+), 5 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/84/20784/1
--
To view, visit http://gerrit.cloudera.org:8080/20784
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib83a99bfa8587a834c74843e1c0dd1c8da203c21
Gerrit-Change-Number: 20784
Gerrit-PatchSet: 1
Gerrit-Owner: Wang Xixu <[email protected]>