clapper: Fix missing unref of mapped file

In case where enhancer plugin version did not match
an unref was missing of read file.
This commit is contained in:
Rafał Dzięgiel
2025-05-19 20:42:11 +02:00
parent e23f2acb3e
commit 1527873bcc

View File

@@ -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) {