diff options
author | Max Kellermann <max@duempel.org> | 2009-04-28 19:57:49 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-04-28 19:57:49 +0200 |
commit | 7d9316a52d935ce6c9f4ae3030c975d660a02db6 (patch) | |
tree | 449de0693d30f16b0bb31980e8bc448efe71284a /src/tag.c | |
parent | fd09a3cf1f645e0156361f287bb8c64e4360981a (diff) | |
download | mpd-7d9316a52d935ce6c9f4ae3030c975d660a02db6.tar.gz mpd-7d9316a52d935ce6c9f4ae3030c975d660a02db6.tar.xz mpd-7d9316a52d935ce6c9f4ae3030c975d660a02db6.zip |
song_save: don't call tag_free(NULL)
When a song was in the database twice (which shouldn't happen), and
the first song had no tag items, MPD calledd tag_free(NULL). Add a
check to that source location, and an assertion to tag_free().
Diffstat (limited to '')
-rw-r--r-- | src/tag.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -163,6 +163,8 @@ void tag_free(struct tag *tag) { int i; + assert(tag != NULL); + g_mutex_lock(tag_pool_lock); for (i = tag->num_items; --i >= 0; ) tag_pool_put_item(tag->items[i]); |