--- deliantra/server/socket/init.C 2006/12/16 03:08:26 1.21 +++ deliantra/server/socket/init.C 2006/12/16 21:40:26 1.22 @@ -92,10 +92,7 @@ mapy = 11; itemcmd = 1; /* Default is version item1 command */ - faces_sent_len = nrofpixmaps; - faces_sent = (uint8 *)calloc (nrofpixmaps, sizeof (*faces_sent)); - if (!faces_sent) - fatal (OUT_OF_MEMORY); + faces_sent = salloc (nrofpixmaps, 0); /* Do this so we don't send a face command for the client for * this face. Face 0 is sent to the client to say clear @@ -114,7 +111,6 @@ cmd_ev.prio (PE_PRIO_NORMAL + 2); // initialisation done, kick it! - send_packet_printf ("version %d %d %s\n", VERSION_CS, VERSION_SC, VERSION_INFO); flush (); @@ -131,11 +127,12 @@ pl->socket = 0; if (fd >= 0) - close (fd), fd = -1; + close (fd); - free (stats.range), stats.range = 0; - free (stats.title), stats.title = 0; - free (host), host = 0; + free (faces_sent); + free (stats.range); + free (stats.title); + free (host); } void