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

Frediano Ziglio fziglio at redhat.com
Fri Apr 7 12:22:39 UTC 2017


Signed-off-by: Frediano Ziglio <fziglio 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;
     }
-- 
2.9.3



More information about the Spice-devel mailing list