From 1527873bcc31c05e580848ae774c1e07921569b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Mon, 19 May 2025 20:42:11 +0200 Subject: [PATCH] clapper: Fix missing unref of mapped file In case where enhancer plugin version did not match an unref was missing of read file. --- src/lib/clapper/clapper-enhancer-proxy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/clapper/clapper-enhancer-proxy.c b/src/lib/clapper/clapper-enhancer-proxy.c index cd70a9ce..8371cdd9 100644 --- a/src/lib/clapper/clapper-enhancer-proxy.c +++ b/src/lib/clapper/clapper-enhancer-proxy.c @@ -345,8 +345,10 @@ clapper_enhancer_proxy_fill_from_cache (ClapperEnhancerProxy *self) } /* Plugin version check */ - if (g_strcmp0 (clapper_cache_read_string (&data), self->version) != 0) + if (g_strcmp0 (clapper_cache_read_string (&data), self->version) != 0) { + g_mapped_file_unref (mapped_file); return FALSE; // not an error + } /* Restore Interfaces */ if ((self->n_ifaces = clapper_cache_read_uint (&data)) > 0) {