Пример #1
0
/*	***********************************************************************	*/
void NPSL_FreeServEnt(NPSL_SERVENT *ptr)
{
	char **tmp_ptr;

	if (ptr->s_name != NULL)
		free(ptr->s_name);

	if (ptr->s_aliases != NULL) {
		tmp_ptr = ptr->s_aliases;
		while (*tmp_ptr != NULL) {
			free(*tmp_ptr);
			tmp_ptr++;
		}
		free(ptr->s_aliases);
	}

	if (ptr->s_proto != NULL)
		free(ptr->s_proto);

	NPSL_InitServEnt(ptr);
}
Пример #2
0
/*	***********************************************************************	*/
void NPSL_InitServEntList(unsigned int in_count, NPSL_SERVENT *in_list)
{
	while (in_count)
		NPSL_InitServEnt(in_list + --in_count);
}