client: don't leak transports
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 14 Jun 2012 07:59:06 +0000 (09:59 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 14 Jun 2012 08:14:06 +0000 (10:14 +0200)
gst/rtsp-server/rtsp-client.c

index 0c63108..c1194da 100644 (file)
@@ -1012,6 +1012,7 @@ not_found:
   {
     send_generic_response (client, GST_RTSP_STS_NOT_FOUND, state);
     g_object_unref (session);
+    gst_rtsp_transport_free (ct);
     return FALSE;
   }
 no_stream:
@@ -1035,11 +1036,13 @@ unsupported_transports:
 no_pool:
   {
     send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, state);
+    gst_rtsp_transport_free (ct);
     return FALSE;
   }
 service_unavailable:
   {
     send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, state);
+    gst_rtsp_transport_free (ct);
     return FALSE;
   }
 }