From c3f28e192af9ae5776c059f4db95fe1840280007 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 18 Mar 2010 21:31:18 +0100 Subject: [PATCH] Fix a leak in mpd.c (refcount fail) --- src/mpd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mpd.c b/src/mpd.c index 24770dbf..a4ca152e 100644 --- a/src/mpd.c +++ b/src/mpd.c @@ -81,9 +81,7 @@ int mpd_set_port(const char *port) void init_mpd(void) { if (!(refcount++)) /* first client */ - memset(&mpd_info, 0, sizeof(struct mpd_s)); - - refcount++; + memset(&mpd_info, 0, sizeof(mpd_info)); } struct mpd_s *mpd_get_info(void)