accept.c   accept.c 
skipping to change at line 69 skipping to change at line 69
/* /*
* Set close-on-exec so that programs that fork() don't get confused. * Set close-on-exec so that programs that fork() don't get confused.
*/ */
_IceTransSetOption (newconn, TRANS_CLOSEONEXEC, 1); _IceTransSetOption (newconn, TRANS_CLOSEONEXEC, 1);
/* /*
* Create an ICE object for this connection. * Create an ICE object for this connection.
*/ */
if ((iceConn = (IceConn) malloc (sizeof (struct _IceConn))) == NULL) if ((iceConn = malloc (sizeof (struct _IceConn))) == NULL)
{ {
_IceTransClose (newconn); _IceTransClose (newconn);
*statusRet = IceAcceptBadMalloc; *statusRet = IceAcceptBadMalloc;
return (NULL); return (NULL);
} }
iceConn->listen_obj = listenObj; iceConn->listen_obj = listenObj;
iceConn->waiting_for_byteorder = True; iceConn->waiting_for_byteorder = True;
iceConn->connection_status = IceConnectPending; iceConn->connection_status = IceConnectPending;
skipping to change at line 94 skipping to change at line 94
iceConn->trans_conn = newconn; iceConn->trans_conn = newconn;
iceConn->send_sequence = 0; iceConn->send_sequence = 0;
iceConn->receive_sequence = 0; iceConn->receive_sequence = 0;
iceConn->connection_string = strdup(listenObj->network_id); iceConn->connection_string = strdup(listenObj->network_id);
if (iceConn->connection_string == NULL) if (iceConn->connection_string == NULL)
{ {
_IceTransClose (newconn); _IceTransClose (newconn);
free ((char *) iceConn); free (iceConn);
*statusRet = IceAcceptBadMalloc; *statusRet = IceAcceptBadMalloc;
return (NULL); return (NULL);
} }
iceConn->vendor = NULL; iceConn->vendor = NULL;
iceConn->release = NULL; iceConn->release = NULL;
if ((iceConn->inbuf = iceConn->inbufptr = if ((iceConn->inbuf = iceConn->inbufptr = malloc (ICE_INBUFSIZE)) != NU
(char *) malloc (ICE_INBUFSIZE)) != NULL) LL)
{ {
iceConn->inbufmax = iceConn->inbuf + ICE_INBUFSIZE; iceConn->inbufmax = iceConn->inbuf + ICE_INBUFSIZE;
} }
else else
{ {
_IceTransClose (newconn); _IceTransClose (newconn);
free ((char *) iceConn); free (iceConn->connection_string);
free (iceConn);
*statusRet = IceAcceptBadMalloc; *statusRet = IceAcceptBadMalloc;
return (NULL); return (NULL);
} }
if ((iceConn->outbuf = iceConn->outbufptr = if ((iceConn->outbuf = iceConn->outbufptr = malloc (ICE_OUTBUFSIZE)) !=
(char *) malloc (ICE_OUTBUFSIZE)) != NULL) NULL)
{ {
iceConn->outbufmax = iceConn->outbuf + ICE_OUTBUFSIZE; iceConn->outbufmax = iceConn->outbuf + ICE_OUTBUFSIZE;
} }
else else
{ {
_IceTransClose (newconn); _IceTransClose (newconn);
free (iceConn->connection_string);
free (iceConn->inbuf); free (iceConn->inbuf);
free ((char *) iceConn); free (iceConn);
*statusRet = IceAcceptBadMalloc; *statusRet = IceAcceptBadMalloc;
return (NULL); return (NULL);
} }
iceConn->scratch = NULL; iceConn->scratch = NULL;
iceConn->scratch_size = 0; iceConn->scratch_size = 0;
iceConn->open_ref_count = 1; iceConn->open_ref_count = 1;
iceConn->proto_ref_count = 0; iceConn->proto_ref_count = 0;
 End of changes. 7 change blocks. 
8 lines changed or deleted 10 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/