From 43afc3b8e3cc41a41515810bd07e56e25f4d206c Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Fri, 2 Apr 2010 20:47:54 +0200 Subject: fixed several memleaks --- main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'main.c') 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 } -- cgit v1.2.3