if (addrs.v) kfree(addrs.v); 
kfree(addrs.v); 
struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,			     const struct sctp_bind_addr *bp,			     gfp_t gfp, int vparam_len){	sctp_inithdr_t init;	union sctp_params addrs;	size_t chunksize;	struct sctp_chunk *retval = NULL;	int num_types, addrs_len = 0;	struct sctp_sock *sp;	sctp_supported_addrs_param_t sat;	__u16 types[2];	sctp_adaption_ind_param_t aiparam;	/* RFC 2960 3.3.2 Initiation (INIT) (1)	 *	 * Note 1: The INIT chunks can contain multiple addresses that	 * can be IPv4 and/or IPv6 in any combination.	 */	retval = NULL;	/* Convert the provided bind address list to raw format. */	addrs = sctp_bind_addrs_to_raw(bp, &addrs_len, gfp);	init.init_tag		   = htonl(asoc->c.my_vtag);	init.a_rwnd		   = htonl(asoc->rwnd);	init.num_outbound_streams  = htons(asoc->c.sinit_num_ostreams);	init.num_inbound_streams   = htons(asoc->c.sinit_max_instreams);	init.initial_tsn	   = htonl(asoc->c.initial_tsn);	/* How many address types are needed? */	sp = sctp_sk(asoc->base.sk);	num_types = sp->pf->supported_addrs(sp, types);	chunksize = sizeof(init) + addrs_len + SCTP_SAT_LEN(num_types);	chunksize += sizeof(ecap_param);	if (sctp_prsctp_enable)		chunksize += sizeof(prsctp_param);	chunksize += sizeof(aiparam);	chunksize += vparam_len;	/* RFC 2960 3.3.2 Initiation (INIT) (1)	 *	 * Note 3: An INIT chunk MUST NOT contain more than one Host	 * Name address parameter. Moreover, the sender of the INIT	 * MUST NOT combine any other address types with the Host Name	 * address in the INIT. The receiver of INIT MUST ignore any	 * other address types if the Host Name address parameter is	 * present in the received INIT chunk.	 *	 * PLEASE DO NOT FIXME [This version does not support Host Name.]	 */	retval = sctp_make_chunk(asoc, SCTP_CID_INIT, 0, chunksize);	if (!retval)		goto nodata;	retval->subh.init_hdr =		sctp_addto_chunk(retval, sizeof(init), &init);	retval->param_hdr.v =		sctp_addto_chunk(retval, addrs_len, addrs.v);	/* RFC 2960 3.3.2 Initiation (INIT) (1)	 *	 * Note 4: This parameter, when present, specifies all the	 * address types the sending endpoint can support. The absence	 * of this parameter indicates that the sending endpoint can	 * support any address type.	 */	sat.param_hdr.type = SCTP_PARAM_SUPPORTED_ADDRESS_TYPES;	sat.param_hdr.length = htons(SCTP_SAT_LEN(num_types));	sctp_addto_chunk(retval, sizeof(sat), &sat);	sctp_addto_chunk(retval, num_types * sizeof(__u16), &types);	sctp_addto_chunk(retval, sizeof(ecap_param), &ecap_param);	if (sctp_prsctp_enable)		sctp_addto_chunk(retval, sizeof(prsctp_param), &prsctp_param);	aiparam.param_hdr.type = SCTP_PARAM_ADAPTION_LAYER_IND;	aiparam.param_hdr.length = htons(sizeof(aiparam));	aiparam.adaption_ind = htonl(sp->adaption_ind);	sctp_addto_chunk(retval, sizeof(aiparam), &aiparam);nodata:	if (addrs.v)		kfree(addrs.v);	return retval;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/a51482bde22f99c63fbbb57d5d46cc666384e379/sm_make_chunk.c/buggy/net/sctp/sm_make_chunk.c