libubx/ubx.c
void ubx_block_free(ubx_block_t *b)
{
	/* configs */
	if (b->configs != NULL) {
		ubx_config_t *config_ptr;

		for (config_ptr = b->configs; config_ptr->name != NULL; config_ptr++)
			ubx_config_free_data(config_ptr);
		free(b->configs);
	}

	/* ports */
	if (b->ports != NULL) {
		ubx_port_t *port_ptr;

		for (port_ptr = b->ports; port_ptr->name != NULL; port_ptr++)
			ubx_port_free_data(port_ptr);
		free(b->ports);
	}

	if (b->prototype)
		free(b->prototype);
	if (b->meta_data)
		free((char *)b->meta_data);
	if (b->name)
		free((char *)b->name);
	if (b)
		free(b);
}
/**
 * ubx_block_free - free all memory related to a block
 *
 * The block should have been previously unregistered.
 *
 * @param block_type
 * @param name
 *
 * @return
 */
free all memory related to a block
The block should have been previously unregistered.

@param block_type
@param name

@return
free all memory related to a block The block should have been previously unregistered . @param block_type @param name @return
void ubx_block_free(ubx_block_t *b)
{
	if (b->configs != NULL) {
		ubx_config_t *config_ptr;
		for (config_ptr = b->configs; config_ptr->name != NULL; config_ptr++)
			ubx_config_free_data(config_ptr);
		free(b->configs);
	}
	if (b->ports != NULL) {
		ubx_port_t *port_ptr;
		for (port_ptr = b->ports; port_ptr->name != NULL; port_ptr++)
			ubx_port_free_data(port_ptr);
		free(b->ports);
	}
	if (b->prototype)
		free(b->prototype);
	if (b->meta_data)
		free((char *)b->meta_data);
	if (b->name)
		free((char *)b->name);
	if (b)
		free(b);
}
void ubx_block_free ( ubx_block_t * b ) { if ( b -> configs != NULL ) { ubx_config_t * config_ptr ; for ( config_ptr = b -> configs ; config_ptr -> name != NULL ; config_ptr ++ ) ubx_config_free_data ( config_ptr ) ; free ( b -> configs ) ; } if ( b -> ports != NULL ) { ubx_port_t * port_ptr ; for ( port_ptr = b -> ports ; port_ptr -> name != NULL ; port_ptr ++ ) ubx_port_free_data ( port_ptr ) ; free ( b -> ports ) ; } if ( b -> prototype ) free ( b -> prototype ) ; if ( b -> meta_data ) free ( ( char * ) b -> meta_data ) ; if ( b -> name ) free ( ( char * ) b -> name ) ; if ( b ) free ( b ) ; }
ubx_block_free - free all memory related to a block
 The block should have been previously unregistered.
ubx_block_free - free all memory related to a block The block should have been previously unregistered .
/* configs */ /* ports */