Changes to try to eliminate setting dcb->session to NULL with risk of crashing system.

This commit is contained in:
counterpoint
2015-08-24 12:12:43 +01:00
parent 5e2e2585ad
commit 37ac158791
7 changed files with 182 additions and 194 deletions

View File

@ -311,6 +311,11 @@ int n_connect = 0;
memcpy(&client_dcb->func, &MyObject, sizeof(GWPROTOCOL));
client_dcb->session =
session_alloc(dcb->session->service, client_dcb);
if (NULL == client_dcb->session)
{
dcb_close(client_dcb);
return n_connect;
}
telnetd_pr = (TELNETD *)malloc(sizeof(TELNETD));
client_dcb->protocol = (void *)telnetd_pr;