[totem/wip/hadess/missing-plugins-check: 6/6] backend: Fix some memory leak on missing plugins




commit 27c536444e8085628b2ce83138b2ede1df9c8bc1
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Mar 29 10:17:21 2022 +0200

    backend: Fix some memory leak on missing plugins

 src/backend/bacon-video-widget.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 82dd1655a..f3ebfff5d 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -5545,8 +5545,10 @@ bacon_video_widget_init (BaconVideoWidget *bvw)
       g_object_ref_sink (bvw->video_sink);
     if (audio_sink)
       g_object_ref_sink (audio_sink);
+    g_clear_object (&audio_sink);
     if (glsinkbin)
       g_object_ref_sink (glsinkbin);
+    g_clear_object (&glsinkbin);
     bvw->init_error = g_error_new_literal (BVW_ERROR, BVW_ERROR_PLUGIN_LOAD,
                                           _("Some necessary plug-ins are missing. "
                                             "Make sure that the program is correctly installed."));


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