diff --git a/pinos/client/stream.c b/pinos/client/stream.c index 4f11b114e..a34ca8b4c 100644 --- a/pinos/client/stream.c +++ b/pinos/client/stream.c @@ -259,6 +259,7 @@ void pinos_stream_destroy (PinosStream *stream) { PinosStreamImpl *impl = SPA_CONTAINER_OF (stream, PinosStreamImpl, this); + int i; pinos_log_debug ("stream %p: destroy", stream); @@ -271,6 +272,13 @@ pinos_stream_destroy (PinosStream *stream) if (impl->node_proxy) pinos_signal_remove (&impl->node_proxy_destroy); + if (impl->possible_formats) { + for (i = 0; i < impl->n_possible_formats; i++) { + free (impl->possible_formats[i]); + } + free (impl->possible_formats); + } + if (impl->format) free (impl->format); @@ -286,6 +294,9 @@ pinos_stream_destroy (PinosStream *stream) if (stream->properties) pinos_properties_free (stream->properties); + if (impl->trans) + pinos_transport_destroy (impl->trans); + if (stream->name) free (stream->name);