rem: udp_sock = socket(AF2PF(addr->s.sa_family), SOCK_DGRAM, 0); if (udp_sock==-1){
add: sock_info->socket = socket(AF2PF(addr->s.sa_family), SOCK_DGRAM, 0); if (sock_info->socket==-1){
context: int udp_init(struct ip_addr* ip, unsigned short port){	union sockaddr_union* addr;	int optval;	addr=(union sockaddr_union*)malloc(sizeof(union sockaddr_union));	if (addr==0){		LOG(L_ERR, "ERROR: udp_init: out of memory\n");		goto error;	}		if (init_su(addr, ip, htons(port))<0){		LOG(L_ERR, "ERROR: udp_init: could not init sockaddr_union\n");		goto error;	}	/*	addr->sin_family=AF_INET;	addr->sin_port=htons(port);	addr->sin_addr.s_addr=ip;	*/		udp_sock = socket(AF2PF(addr->s.sa_family), SOCK_DGRAM, 0);	if (udp_sock==-1){		LOG(L_ERR, "ERROR: udp_init: socket: %s\n", strerror(errno));		goto error;	}	/* set sock opts? */	optval=1;	if (setsockopt(udp_sock, SOL_SOCKET, SO_REUSEADDR ,					(void*)&optval, sizeof(optval)) ==-1)	{		LOG(L_ERR, "ERROR: udp_init: setsockopt: %s\n", strerror(errno));		goto error;	}	if ( probe_max_receive_buffer(udp_sock)==-1) goto error;	bind_address=ip;	if (bind(udp_sock,  &addr->s, sizeof(union sockaddr_union))==-1){		LOG(L_ERR, "ERROR: udp_init: bind: %s\n", strerror(errno));		goto error;	}	free(addr);	return 0;error:	if (addr) free(addr);	return -1;}