From e23964cb5fe438145cd21e537239d5824781b656 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Thu, 25 May 2023 14:48:11 +0800 Subject: [PATCH] glupload: Fix a memory leak point in gst_egl_image_cache_unref() The image cache itself should be freed when ref_count is 0. Part-of: --- subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c index 39d88bf4bf..15530a12da 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c @@ -528,6 +528,7 @@ gst_egl_image_cache_unref (GstEGLImageCache * cache) if (g_atomic_int_dec_and_test (&cache->ref_count)) { g_hash_table_unref (cache->hash_table); g_mutex_clear (&cache->lock); + g_free (cache); } }