From ba79f4c1f9b9868db04ece3c8870085a25915556 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 31 Jul 2013 09:02:07 +0200 Subject: Tag: check bulk mode in Clear() --- src/Tag.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Tag.cxx b/src/Tag.cxx index 7853f0a2f..39560d49d 100644 --- a/src/Tag.cxx +++ b/src/Tag.cxx @@ -143,7 +143,14 @@ Tag::Clear() tag_pool_put_item(items[i]); tag_pool_lock.unlock(); - g_free(items); + if (items == bulk.items) { +#ifndef NDEBUG + assert(bulk.busy); + bulk.busy = false; +#endif + } else + g_free(items); + items = nullptr; num_items = 0; } -- cgit v1.2.3