chiark / gitweb /
Disobedience: basic support for required/prohibited tags.
[disorder] / lib / client.c
index c621ead5612364b3be836c8807df10816bc343fe..2cbcfa76201324f07dc0668975b5dd5c51a98291 100644 (file)
@@ -519,7 +519,7 @@ int disorder_close(disorder_client *c) {
   c->ident = 0;
   xfree(c->user);
   c->user = 0;
-  return 0;
+  return ret;
 }
 
 /** @brief Play a track
@@ -653,6 +653,7 @@ static int disorder_somequeue(disorder_client *c,
     if(!strcmp(l, ".")) {
       *qt = 0;
       *qp = qh;
+      xfree(l);
       return 0;
     }
     q = xmalloc(sizeof *q);
@@ -660,6 +661,7 @@ static int disorder_somequeue(disorder_client *c,
       *qt = q;
       qt = &q->next;
     }
+    xfree(l);
   }
   if(ferror(c->fpin)) {
     byte_xasprintf((char **)&c->last, "input error: %s", strerror(errno));
@@ -867,7 +869,9 @@ int disorder_prefs(disorder_client *c, const char *track, struct kvp **kp) {
     k->name = pvec[0];
     k->value = pvec[1];
     kp = &k->next;
+    xfree(pvec);
   }
+  free_strings(nvec, vec);
   *kp = 0;
   return 0;
 }