mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
Remove redundant nullptr checks before deallocation
Rationale: * delete ptr is a no-op if ptr is nullptr
This commit is contained in:
parent
140de14a12
commit
b109a1c396
@ -2753,8 +2753,7 @@ CNode::~CNode()
|
|||||||
{
|
{
|
||||||
CloseSocket(hSocket);
|
CloseSocket(hSocket);
|
||||||
|
|
||||||
if (pfilter)
|
delete pfilter;
|
||||||
delete pfilter;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNode::AskFor(const CInv& inv)
|
void CNode::AskFor(const CInv& inv)
|
||||||
|
@ -194,8 +194,7 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
|
|||||||
qWarning() << "PaymentRequestPlus::getMerchant: SSL error: " << err.what();
|
qWarning() << "PaymentRequestPlus::getMerchant: SSL error: " << err.what();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (website)
|
delete[] website;
|
||||||
delete[] website;
|
|
||||||
X509_STORE_CTX_free(store_ctx);
|
X509_STORE_CTX_free(store_ctx);
|
||||||
for (unsigned int i = 0; i < certs.size(); i++)
|
for (unsigned int i = 0; i < certs.size(); i++)
|
||||||
X509_free(certs[i]);
|
X509_free(certs[i]);
|
||||||
|
@ -364,8 +364,7 @@ void PaymentServer::initNetManager()
|
|||||||
{
|
{
|
||||||
if (!optionsModel)
|
if (!optionsModel)
|
||||||
return;
|
return;
|
||||||
if (netManager != nullptr)
|
delete netManager;
|
||||||
delete netManager;
|
|
||||||
|
|
||||||
// netManager is used to fetch paymentrequests given in bitcoin: URIs
|
// netManager is used to fetch paymentrequests given in bitcoin: URIs
|
||||||
netManager = new QNetworkAccessManager(this);
|
netManager = new QNetworkAccessManager(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user