CID 1981 : NULL pointer dereference on error.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38082 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues
2010-08-13 12:23:18 +00:00
parent 1401598fed
commit cac07c64e8
+4 -1
View File
@@ -270,7 +270,10 @@ int32 PoorManServer::_Worker(void* data)
if (receive_data(&sender, &hc, sizeof(httpd_conn*)) != 512)
goto cleanup;
} else {
goto cleanup;
// No need to go throught the whole cleanup, as we haven't open
// nor allocated ht yet.
atomic_add(&s->fCurConns, -1);
return 0;
}
PRINT(("A worker thread starts to work.\n"));