Browse Source

Merge #10696: Remove redundant nullptr checks before deallocation

b109a1c Remove redundant nullptr checks before deallocation (practicalswift)

Pull request description:

  Rationale:
  * `delete ptr` is a no-op if `ptr` is `nullptr`

Tree-SHA512: c98ce769125c4912186a8403cc08a59cfba85b7141af645c709b4c4eb90dd9cbdd6ed8076d50099d1e4ec2bf75917d1af6844082ec42bbb4d94d229a710e051c
0.16
Wladimir J. van der Laan 7 years ago
parent
commit
ef3758d1ef
No known key found for this signature in database
GPG Key ID: 1E4AED62986CD25D
  1. 1
      src/net.cpp
  2. 1
      src/qt/paymentrequestplus.cpp
  3. 1
      src/qt/paymentserver.cpp

1
src/net.cpp

@ -2778,7 +2778,6 @@ CNode::~CNode() @@ -2778,7 +2778,6 @@ CNode::~CNode()
{
CloseSocket(hSocket);
if (pfilter)
delete pfilter;
}

1
src/qt/paymentrequestplus.cpp

@ -194,7 +194,6 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c @@ -194,7 +194,6 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
qWarning() << "PaymentRequestPlus::getMerchant: SSL error: " << err.what();
}
if (website)
delete[] website;
X509_STORE_CTX_free(store_ctx);
for (unsigned int i = 0; i < certs.size(); i++)

1
src/qt/paymentserver.cpp

@ -362,7 +362,6 @@ void PaymentServer::initNetManager() @@ -362,7 +362,6 @@ void PaymentServer::initNetManager()
{
if (!optionsModel)
return;
if (netManager != nullptr)
delete netManager;
// netManager is used to fetch paymentrequests given in bitcoin: URIs

Loading…
Cancel
Save