From 16d050be2b5660f86cf65c465dd5e49ed615b4d0 Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Mon, 25 Mar 2019 10:44:47 +0100
Subject: Released lock in all cases.

---
 src/glibext/configuration.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/glibext/configuration.c b/src/glibext/configuration.c
index 09d2d37..8f2103d 100644
--- a/src/glibext/configuration.c
+++ b/src/glibext/configuration.c
@@ -1517,12 +1517,14 @@ GCfgParam *_g_generic_config_add_param(GGenConfig *config, GCfgParam *param, boo
     old = _g_generic_config_search(config, path, false);
     if (old != NULL)
     {
-        g_object_unref(G_OBJECT(param));
-        return NULL;
+        g_clear_object(&param);
+	goto exit;
     }
 
     config->params = g_list_append(config->params, param);
 
+ exit:
+
     if (lock)
         g_generic_config_wunlock(config);
 
-- 
cgit v0.11.2-87-g4458