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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]