summaryrefslogtreecommitdiff
path: root/plugins/mpgmad
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-02 18:45:49 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-02 18:45:49 +0200
commit91e6c9743f449c64351fff801e2abd528ebdcd4b (patch)
tree3c430727d2b6ae8bee9bf6cff70da306da7deb3c /plugins/mpgmad
parentab9f5abcf64ed36193f270d621c06c4b8fd5e82d (diff)
fixed ton of memleaks and memory-related crashes
Diffstat (limited to 'plugins/mpgmad')
-rw-r--r--plugins/mpgmad/mpgmad.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c
index 8adbf7a9..98b20e85 100644
--- a/plugins/mpgmad/mpgmad.c
+++ b/plugins/mpgmad/mpgmad.c
@@ -24,8 +24,8 @@
#include <unistd.h>
#include "../../deadbeef.h"
-#define trace(...) { fprintf(stderr, __VA_ARGS__); }
-//#define trace(fmt,...)
+//#define trace(...) { fprintf(stderr, __VA_ARGS__); }
+#define trace(fmt,...)
#define min(x,y) ((x)<(y)?(x):(y))
#define max(x,y) ((x)>(y)?(x):(y))
@@ -1088,6 +1088,7 @@ cmp3_insert (DB_playItem_t *after, const char *fname) {
deadbeef->pl_set_item_duration (it, -1);
it->filetype = NULL;//filetypes[0];
after = deadbeef->pl_insert_item (after, it);
+ deadbeef->pl_item_unref (it);
return after;
}
buffer_t buffer;
@@ -1167,6 +1168,7 @@ cmp3_insert (DB_playItem_t *after, const char *fname) {
}
after = deadbeef->pl_insert_item (after, it);
+ deadbeef->pl_item_unref (it);
return after;
}