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:
parent
3b3799889e
commit
1c5e1b705c
@ -1672,7 +1672,7 @@ void *timeout_thread( void *ptr )
|
||||
Test->timeout--;
|
||||
}
|
||||
Test->tprintf("\n **** Timeout! *** \n");
|
||||
delete Test;
|
||||
Test->~TestConnections();
|
||||
exit(250);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user