Fix a leak in mpd.c (refcount fail)
authorPavel Labath <pavelo@centrum.sk>
Thu, 18 Mar 2010 20:31:18 +0000 (21:31 +0100)
committerPavel Labath <pavelo@centrum.sk>
Thu, 18 Mar 2010 20:34:11 +0000 (21:34 +0100)
src/mpd.c

index 24770db..a4ca152 100644 (file)
--- 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)