/* Decrease an entry's reference count and free if necessary when the reference count drops to zero.  */
void qed_unref_l2_cache_entry(CachedL2Table *entry)
/* Decrease an entry's reference count and free if necessary when the reference count drops to zero.  */
void qed_unref_l2_cache_entry(CachedL2Table *entry)
{
    if (!entry) {
        return;
    }
    entry->ref--;
    trace_qed_unref_l2_cache_entry(entry, entry->ref);
    if (entry->ref == 0) {
        qemu_vfree(entry->table);
        g_free(entry);
    }
}