Code auditing weekend results and fixes committing.
[silc.git] / lib / silccore / silcsockconn.c
index f6de8aa9a81db41d3f2a6e38758b83ef493c4636..3262cfc4153f63b81b6d4ddc049a3e6f8b3693a1 100644 (file)
 /*
  * $Id$
  * $Log$
- * Revision 1.1  2000/06/27 11:36:55  priikone
- * Initial revision
+ * Revision 1.3  2001/02/11 14:09:34  priikone
+ *     Code auditing weekend results and fixes committing.
+ *
+ * Revision 1.2  2000/07/05 06:06:35  priikone
+ *     Global cosmetic change.
+ *
+ * Revision 1.1.1.1  2000/06/27 11:36:55  priikone
+ *     Imported from internal CVS/Added Log headers.
  *
  *
  */
@@ -36,14 +42,9 @@ void silc_socket_alloc(int sock, SilcSocketType type, void *user_data,
 {
   SILC_LOG_DEBUG(("Allocating new socket connection object"));
 
-  *new_socket = silc_calloc(1, sizeof(**new_socket));
-  if (*new_socket == NULL) {
-    SILC_LOG_ERROR(("Could not allocate new socket connection object"));
-    return;
-  }
-
   /* Set the pointers. Incoming and outgoing data buffers
      are allocated by the server when they are first used. */
+  *new_socket = silc_calloc(1, sizeof(**new_socket));
   (*new_socket)->sock = sock;
   (*new_socket)->type = type;
   (*new_socket)->user_data = user_data;
@@ -58,7 +59,6 @@ void silc_socket_alloc(int sock, SilcSocketType type, void *user_data,
 void silc_socket_free(SilcSocketConnection sock)
 {
   if (sock) {
-    //    silc_protocol_free(sock->protocol);
     silc_buffer_free(sock->inbuf);
     silc_buffer_free(sock->outbuf);
     silc_free(sock);