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,
}
GianoAuthenticator::~GianoAuthenticator() {
if (_generator) {
delete _generator;
_generator = NULL;
}
if (_verifier) {
delete _verifier;
_verifier = NULL;
}
delete _generator;
_generator = NULL;
delete _verifier;
_verifier = NULL;
}
int GianoAuthenticator::GenerateCredential(std::string* auth_str) const {
......
......@@ -156,10 +156,10 @@ SocketMap::~SocketMap() {
LOG(ERROR) << err.str();
}
}
if (_this_map_bvar) {
delete _this_map_bvar;
_this_map_bvar = NULL;
}
delete _this_map_bvar;
_this_map_bvar = NULL;
delete _options.socket_creator;
_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