X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FIPStack%2Ftcp.c;h=36837a5f5b09bcc8d67fbbc1363db7be1db904f5;hb=45f9a29e481ce9ea7ca7121541f0e0f90147f5b1;hp=741ec1406e481530fe242c03e8b682ca585b69bd;hpb=54746c855c6e2fe42fde9f93b0ce3f41aeefc2e5;p=tpg%2Facess2.git diff --git a/Modules/IPStack/tcp.c b/Modules/IPStack/tcp.c index 741ec140..36837a5f 100644 --- a/Modules/IPStack/tcp.c +++ b/Modules/IPStack/tcp.c @@ -482,6 +482,13 @@ tVFS_Node *TCP_Server_Init(tInterface *Interface) { tTCPListener *srv = malloc( sizeof(tTCPListener) ); + Log_Debug("TCP", "srv = %p", srv); + + if( srv == NULL ) { + Log_Warning("TCP", "malloc failed for listener (%i) bytes", sizeof(tTCPListener)); + return NULL; + } + srv->Interface = Interface; srv->Port = 0; srv->NextID = 0;