Yingchun Lai has submitted this change and it was merged. ( 
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
Reviewed-on: http://gerrit.cloudera.org:8080/20784
Reviewed-by: Yingchun Lai <[email protected]>
Tested-by: Yingchun Lai <[email protected]>
---
M src/kudu/consensus/quorum_util-test.cc
1 file changed, 3 insertions(+), 5 deletions(-)

Approvals:
  Yingchun Lai: Looks good to me, approved; Verified

--
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: merged
Gerrit-Change-Id: Ib83a99bfa8587a834c74843e1c0dd1c8da203c21
Gerrit-Change-Number: 20784
Gerrit-PatchSet: 2
Gerrit-Owner: Wang Xixu <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <[email protected]>

Reply via email to