Skip to content

Commit

Permalink
Remove redundant nullptr checks before deallocation
Browse files Browse the repository at this point in the history
Rationale:
* delete ptr is a no-op if ptr is nullptr
  • Loading branch information
practicalswift authored and furszy committed May 14, 2021
1 parent 5390862 commit 7772138
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2481,8 +2481,7 @@ CNode::~CNode()
{
CloseSocket(hSocket);

if (pfilter)
delete pfilter;
delete pfilter;
}

void CNode::AskFor(const CInv& inv)
Expand Down

0 comments on commit 7772138

Please sign in to comment.