Don't delete but call destructor on timeout

Deleting a stack allocated object will cause an immediate crash whereas
only calling the destructor will successfully complete the call with a
possibility of leaked memory or a crash later on.
This commit is contained in:
Markus Mäkelä 2017-06-29 13:36:24 +03:00
parent 3b3799889e
commit 1c5e1b705c

View File

@ -1672,7 +1672,7 @@ void *timeout_thread( void *ptr )
Test->timeout--;
}
Test->tprintf("\n **** Timeout! *** \n");
delete Test;
Test->~TestConnections();
exit(250);
}