diff options
Diffstat (limited to 'src/tag.c')
-rw-r--r-- | src/tag.c | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -296,12 +296,12 @@ void tag_clear_items_by_type(struct mpd_tag *tag, enum tag_type type) } } -static void clearMpdTag(struct mpd_tag *tag) +void tag_free(struct mpd_tag *tag) { int i; pthread_mutex_lock(&tag_pool_lock); - for (i = 0; i < tag->numOfItems; i++) + for (i = tag->numOfItems; --i >= 0; ) tag_pool_put_item(tag->items[i]); pthread_mutex_unlock(&tag_pool_lock); @@ -314,16 +314,6 @@ static void clearMpdTag(struct mpd_tag *tag) free(tag->items); } - tag->items = NULL; - - tag->numOfItems = 0; - - tag->time = -1; -} - -void tag_free(struct mpd_tag *tag) -{ - clearMpdTag(tag); free(tag); } |