Commit 2a1d50d6 authored by gejun's avatar gejun

remove unneeded if before delete

parent f0d91733
...@@ -39,14 +39,11 @@ GianoAuthenticator::GianoAuthenticator(const baas::CredentialGenerator* gen, ...@@ -39,14 +39,11 @@ GianoAuthenticator::GianoAuthenticator(const baas::CredentialGenerator* gen,
} }
GianoAuthenticator::~GianoAuthenticator() { GianoAuthenticator::~GianoAuthenticator() {
if (_generator) { delete _generator;
delete _generator; _generator = NULL;
_generator = NULL;
} delete _verifier;
if (_verifier) { _verifier = NULL;
delete _verifier;
_verifier = NULL;
}
} }
int GianoAuthenticator::GenerateCredential(std::string* auth_str) const { int GianoAuthenticator::GenerateCredential(std::string* auth_str) const {
......
...@@ -156,10 +156,10 @@ SocketMap::~SocketMap() { ...@@ -156,10 +156,10 @@ SocketMap::~SocketMap() {
LOG(ERROR) << err.str(); LOG(ERROR) << err.str();
} }
} }
if (_this_map_bvar) {
delete _this_map_bvar; delete _this_map_bvar;
_this_map_bvar = NULL; _this_map_bvar = NULL;
}
delete _options.socket_creator; delete _options.socket_creator;
_options.socket_creator = NULL; _options.socket_creator = NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment