diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-03-25 09:44:47 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-03-25 09:44:47 (GMT) |
commit | 16d050be2b5660f86cf65c465dd5e49ed615b4d0 (patch) | |
tree | a5b5fe00a264970ce37c88d0531f3b9ce6865020 /src | |
parent | 8e275f286138db88140d1643d1008f130ba7f484 (diff) |
Released lock in all cases.
Diffstat (limited to 'src')
-rw-r--r-- | src/glibext/configuration.c | 6 |
1 files 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(¶m); + goto exit; } config->params = g_list_append(config->params, param); + exit: + if (lock) g_generic_config_wunlock(config); |