mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 19:19:02 -04:00
Either store the Resolver in DNS::AddResolverClass() or delete it before returning
This commit is contained in:
parent
99a470a590
commit
2bdbb2878e
17
src/dns.cpp
17
src/dns.cpp
@ -1068,20 +1068,13 @@ bool DNS::AddResolverClass(Resolver* r)
|
||||
Classes[r->GetId()] = r;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
/* Duplicate id */
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Pointer or id not valid.
|
||||
* Free the item and return
|
||||
*/
|
||||
if (r)
|
||||
delete r;
|
||||
|
||||
return false;
|
||||
}
|
||||
/* Pointer or id not valid, or duplicate id.
|
||||
* Free the item and return
|
||||
*/
|
||||
delete r;
|
||||
return false;
|
||||
}
|
||||
|
||||
void DNS::CleanResolvers(Module* module)
|
||||
|
Loading…
x
Reference in New Issue
Block a user