Browse Source

Remove redundant nullptr checks before deallocation

Rationale:
* delete ptr is a no-op if ptr is nullptr
0.16
practicalswift 8 years ago
parent
commit
b109a1c396
  1. 1
      src/net.cpp
  2. 1
      src/qt/paymentrequestplus.cpp
  3. 1
      src/qt/paymentserver.cpp

1
src/net.cpp

@ -2753,7 +2753,6 @@ CNode::~CNode() @@ -2753,7 +2753,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

@ -364,7 +364,6 @@ void PaymentServer::initNetManager() @@ -364,7 +364,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