out:
out0:
IpfixReceiver* createIpfixReceiver(uint16_t port) {	IpfixReceiver* ipfixReceiver;	struct sockaddr_in serverAddress;		if(!(ipfixReceiver=(IpfixReceiver*)malloc(sizeof(IpfixReceiver)))) {		goto out;		}	ipfixReceiver->callbackInfo = 0;		if(!(ipfixReceiver->templateBuffer = createTemplateBuffer(ipfixReceiver))) {		goto out1;		}	pthread_mutex_lock(&ipfixReceiver->mutex);	ipfixReceiver->socket = socket(AF_INET, SOCK_DGRAM, 0);	if(ipfixReceiver->socket < 0) {		perror("socket");		goto out2;		}	serverAddress.sin_family = AF_INET;	serverAddress.sin_addr.s_addr = htonl(INADDR_ANY);	serverAddress.sin_port = htons(port);	if(bind(ipfixReceiver->socket, (struct sockaddr*)&serverAddress, sizeof(struct sockaddr_in)) < 0) {		perror("bind");		goto out3;		}	if(pthread_create(&(ipfixReceiver->thread), 0, listenerUdpIpv4, ipfixReceiver) != 0) {		goto out3;		}	//listenerUdpIpv4(ipfixReceiver); //debug - single-threaded		return ipfixReceiver;out3:	close(ipfixReceiver->socket);out2:	destroyTemplateBuffer(ipfixReceiver->templateBuffer);out1:	free(ipfixReceiver);out:	return NULL;	}