[Spice-devel] [PATCH spice-server] gstreamer: Remove some leaks if pipeline cannot be created

Pavel Grunt pgrunt at redhat.com
Fri Apr 7 13:35:38 UTC 2017


On Fri, 2017-04-07 at 13:22 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Pavel Grunt <pgrunt at redhat.com>
> ---
>  server/gstreamer-encoder.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c
> index 1ce8d58..bb4f27b 100644
> --- a/server/gstreamer-encoder.c
> +++ b/server/gstreamer-encoder.c
> @@ -1745,6 +1745,8 @@ VideoEncoder
> *gstreamer_encoder_new(SpiceVideoCodecType codec_type,
>  
>      if (!create_pipeline(encoder)) {
>          /* Some GStreamer dependency is probably missing */
> +        pthread_cond_destroy(&encoder->outbuf_cond);
> +        pthread_mutex_destroy(&encoder->outbuf_mutex);
>          free(encoder);
>          encoder = NULL;
>      }


More information about the Spice-devel mailing list