]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/protocol-simple.c
core: memory leak, fix ref counting when moving streams
[pulseaudio] / src / pulsecore / protocol-simple.c
index e149c40dcb4ca60f2c9b57cfbcc29401ac716b8c..44fe5973d07cd7b9536a0f3112ce0a989a5d6c9f 100644 (file)
@@ -5,7 +5,7 @@
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
-  by the Free Software Foundation; either version 2 of the License,
+  by the Free Software Foundation; either version 2.1 of the License,
   or (at your option) any later version.
 
   PulseAudio is distributed in the hope that it will be useful, but
@@ -283,6 +283,9 @@ static int connection_process_msg(pa_msgobject *o, int code, void*userdata, int6
     connection *c = CONNECTION(o);
     connection_assert_ref(c);
 
+    if (!c->protocol)
+        return -1;
+
     switch (code) {
         case CONNECTION_MESSAGE_REQUEST_DATA:
             do_work(c);