Logo Search packages:      
Sourcecode: libnl2 version File versions  Download package

void nl_cache_free ( struct nl_cache *  cache  ) 

Free a cache.

  • cache Cache to free.
Removes all elements of a cache and frees all memory.

Note:
Use this function if you are working with allocated caches.

Definition at line 284 of file cache.c.

References nl_cache_clear().

Referenced by genl_ctrl_resolve(), nl_cache_mngr_add(), nl_cache_mngr_free(), rtnl_class_alloc_cache(), and rtnl_cls_alloc_cache().

{
      if (!cache)
            return;

      nl_cache_clear(cache);
      NL_DBG(1, "Freeing cache %p <%s>...\n", cache, nl_cache_name(cache));
      free(cache);
}


Generated by  Doxygen 1.6.0   Back to index