FreeBSD/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.c
/*
 * Called, when the module is to be unloaded after it was successfully loaded
 */
Called, when the module is to be unloaded after it was successfully loaded
Called when the module is to be unloaded after it was successfully loaded
static int
ng_fini(void)
{
	struct ngtype *t;
	while ((t = TAILQ_FIRST(&ngtype_list)) != NULL) {
		TAILQ_REMOVE(&ngtype_list, t, link);
		free(t);
	}
	if (csock_fd != NULL)
		fd_deselect(csock_fd);
	(void)close(csock);
	if (dsock_fd != NULL)
		fd_deselect(dsock_fd);
	(void)close(dsock);
	free(snmp_nodename);
	or_unregister(reg_index);
	return (0);
}
static int ng_fini ( void ) { struct ngtype * t ; while ( ( t = TAILQ_FIRST ( & ngtype_list ) ) != NULL ) { TAILQ_REMOVE ( & ngtype_list , t , link ) ; free ( t ) ; } if ( csock_fd != NULL ) fd_deselect ( csock_fd ) ; ( void ) close ( csock ) ; if ( dsock_fd != NULL ) fd_deselect ( dsock_fd ) ; ( void ) close ( dsock ) ; free ( snmp_nodename ) ; or_unregister ( reg_index ) ; return ( 0 ) ; }
Called, when the module is to be unloaded after it was successfully loaded
Called when the module is to be unloaded after it was successfully loaded