You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Wang Xixu (Code Review)" <ge...@cloudera.org> on 2023/12/13 04:09:34 UTC

[kudu-CR] [Refactor] Fix a memory leak warning

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 <14...@qq.com>

[kudu-CR] [Refactor] Fix a memory leak warning

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has removed a vote on this change.

Change subject: [Refactor] Fix a memory leak warning
......................................................................


Removed Verified-1 by Kudu Jenkins (120)
-- 
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: deleteVote
Gerrit-Change-Id: Ib83a99bfa8587a834c74843e1c0dd1c8da203c21
Gerrit-Change-Number: 20784
Gerrit-PatchSet: 1
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>

[kudu-CR] [Refactor] Fix a memory leak warning

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
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 <la...@apache.org>
Tested-by: Yingchun Lai <la...@apache.org>
---
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 <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>

[kudu-CR] [Refactor] Fix a memory leak warning

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/20784 )

Change subject: [Refactor] Fix a memory leak warning
......................................................................


Patch Set 1: Verified+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: comment
Gerrit-Change-Id: Ib83a99bfa8587a834c74843e1c0dd1c8da203c21
Gerrit-Change-Number: 20784
Gerrit-PatchSet: 1
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Comment-Date: Thu, 14 Dec 2023 10:13:38 +0000
Gerrit-HasComments: No

[kudu-CR] [Refactor] Fix a memory leak warning

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/20784 )

Change subject: [Refactor] Fix a memory leak warning
......................................................................


Patch Set 1: Code-Review+2


-- 
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: comment
Gerrit-Change-Id: Ib83a99bfa8587a834c74843e1c0dd1c8da203c21
Gerrit-Change-Number: 20784
Gerrit-PatchSet: 1
Gerrit-Owner: Wang Xixu <14...@qq.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Comment-Date: Thu, 14 Dec 2023 10:13:12 +0000
Gerrit-HasComments: No