summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-05-08 19:24:38 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-05-08 19:24:38 +0200
commit30e0e82f695a5d04ee75b5caf09283fd0a6533ec (patch)
tree66ab5ab71a6ae353fe676c53301f509ec8c08ad3
parentd79dcf5dbddc0f9844ab1af965322dbab79b2c99 (diff)
fixed memleak in gtkui coverart cache
-rw-r--r--plugins/gtkui/coverart.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/gtkui/coverart.c b/plugins/gtkui/coverart.c
index c86f447c..c8a58d48 100644
--- a/plugins/gtkui/coverart.c
+++ b/plugins/gtkui/coverart.c
@@ -299,6 +299,12 @@ cover_art_free (void) {
while (queue) {
queue_pop ();
}
+ for (int i = 0; i < CACHE_SIZE; i++) {
+ if (cache[i].pixbuf) {
+ g_object_unref (cache[i].pixbuf);
+ }
+ }
+ memset (cache, 0, sizeof (cache));
deadbeef->mutex_free (cond);
deadbeef->mutex_free (mutex);
}