rtp: Freeing ioline when disconnecting
authorHajime Fujita <crisp.fujita@nifty.com>
Mon, 1 Feb 2016 04:15:59 +0000 (22:15 -0600)
committerTanu Kaskinen <tanuk@iki.fi>
Thu, 19 Jan 2017 00:56:53 +0000 (02:56 +0200)
pa_ioline_close does not free the ioline structure itself, so we
have to unref the structure if we want to free it.

Reviewed-by: Anton Lundin <glance@acc.umu.se>
src/modules/rtp/rtsp_client.c

index bdfd24f..6f828ba 100644 (file)
@@ -348,8 +348,10 @@ void pa_rtsp_set_callback(pa_rtsp_client *c, pa_rtsp_cb_t callback, void *userda
 void pa_rtsp_disconnect(pa_rtsp_client *c) {
     pa_assert(c);
 
-    if (c->ioline)
+    if (c->ioline) {
         pa_ioline_close(c->ioline);
+        pa_ioline_unref(c->ioline);
+    }
     c->ioline = NULL;
 }