Ensure nsock pool is not deleted twice

This commit is contained in:
dmiller 2026-04-15 03:21:56 +00:00
parent 7baee8efa9
commit df9391e57a

View file

@ -120,7 +120,10 @@ int ProbeMode::init_nsock(){
/** Cleans up the internal nsock pool and any other internal data that
* needs to be taken care of before destroying the object. */
int ProbeMode::cleanup(){
nsock_pool_delete(this->nsp);
if (this->nsock_init) {
nsock_pool_delete(this->nsp);
this->nsp = NULL;
}
return OP_SUCCESS;
} /* End of cleanup() */