summaryrefslogtreecommitdiff
path: root/plugins/gtkui/fileman.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-03 22:20:18 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-03 22:20:18 +0200
commite780b00c954190e49086163cb59d9354a7f7a435 (patch)
tree7d3c2882b77fe500c8a760b4668b2edf2ffc3316 /plugins/gtkui/fileman.c
parent040bb51a271bfb766711b4bd2e2b4342a22132b3 (diff)
fixed segfault/memleak in dragndrop
Diffstat (limited to 'plugins/gtkui/fileman.c')
-rw-r--r--plugins/gtkui/fileman.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/gtkui/fileman.c b/plugins/gtkui/fileman.c
index b1fa28af..1ae8b4aa 100644
--- a/plugins/gtkui/fileman.c
+++ b/plugins/gtkui/fileman.c
@@ -197,6 +197,7 @@ gtkpl_add_fm_dropped_files (DB_playItem_t *drop_before, char *ptr, int length) {
deadbeef->pl_item_unref (after);
}
after = inserted;
+ deadbeef->pl_item_ref (after);
}
}
p = pe;
@@ -205,6 +206,9 @@ gtkpl_add_fm_dropped_files (DB_playItem_t *drop_before, char *ptr, int length) {
p++;
}
}
+ if (after) {
+ deadbeef->pl_item_unref (after);
+ }
free (ptr);
g_idle_add (progress_hide_idle, NULL);