summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-02 20:47:54 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-02 20:47:54 +0200
commit43afc3b8e3cc41a41515810bd07e56e25f4d206c (patch)
tree88954da3e561d54cdac1b2331b4c470edbb6c21c /main.c
parentafc9d00750d37e8a1e5e0c35e3c11bab20b2282f (diff)
fixed several memleaks
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.c b/main.c
index 24dff4a0..129273b4 100644
--- a/main.c
+++ b/main.c
@@ -148,6 +148,9 @@ server_exec_command_line (const char *cmdline, int len, char *sendback, int sbsi
else {
strcpy (sendback, "nowplaying nothing");
}
+ if (curr) {
+ pl_item_unref (curr);
+ }
}
else {
char out[2048];
@@ -159,6 +162,9 @@ server_exec_command_line (const char *cmdline, int len, char *sendback, int sbsi
else {
strcpy (out, "nothing");
}
+ if (curr) {
+ pl_item_unref (curr);
+ }
fwrite (out, 1, strlen (out), stdout);
return 1; // exit
}