/** * mnt_free_table: * @tb: tab pointer * * Deallocates tab struct and all entries. */ void mnt_free_table(struct libmnt_table *tb) { if (!tb) return; mnt_reset_table(tb); DBG(TAB, mnt_debug_h(tb, "free")); free(tb); }
/** * mnt_free_table: * @tb: tab pointer * * Deallocates the table. This function does not care about reference count. Don't * use this function directly -- it's better to use use mnt_unref_table(). * * The table entries (filesystems) are unrefrenced by mnt_reset_table() and * cache by mnt_unref_cache(). */ void mnt_free_table(struct libmnt_table *tb) { if (!tb) return; mnt_reset_table(tb); DBG(TAB, ul_debugobj(tb, "free [refcount=%d]", tb->refcount)); mnt_unref_cache(tb->cache); free(tb->comm_intro); free(tb->comm_tail); free(tb); }