if (template == NULL) {
if (templ == NULL) {
int ipfix_deinit_template_set (ipfix_exporter *exporter, ipfix_lo_template *template) {	// note: ipfix_deinit_template_array tries to free all possible templates, many of them	// won't be initialized. So you'll get a lot of warning messages, which are just fine...	if (template == NULL) {		DPRINTF("ipfix_deinit_template_set: Cannot free template. Template is already NULL\n!");		return -1;	}	// FIXME: make sure, we get a mutex lock on the templates, or else an other process	// might try to write to an unclean template!!!	// first test, if we can free this template	if ( (template->valid == COMMITED) || (template->valid == UNCLEAN )) {		template->valid = UNUSED;		free(template->template_fields);		exporter->ipfix_lo_template_current_count--;	} else {		DPRINTF("ipfix_deinit_template_set: Cannot free template. Template is UNUSED\n");		return -1;	}	return 0;}