diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-09-24 14:38:48 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-09-24 14:38:48 +0100 |
commit | 1d14bc6468d97834806668b437c26f20630fdc7c (patch) | |
tree | b46bfef91f9eb5a3555b92bc6017c5ecb0544d4a /contrib/libucl | |
parent | a8532008233d2e23dc57e4f5b358704cea3f8a1b (diff) | |
download | rspamd-1d14bc6468d97834806668b437c26f20630fdc7c.tar.gz rspamd-1d14bc6468d97834806668b437c26f20630fdc7c.zip |
[Fix] Libucl: avoid memory leak on objects merging
Diffstat (limited to 'contrib/libucl')
-rw-r--r-- | contrib/libucl/ucl_util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/libucl/ucl_util.c b/contrib/libucl/ucl_util.c index 13544af28..3f2483c10 100644 --- a/contrib/libucl/ucl_util.c +++ b/contrib/libucl/ucl_util.c @@ -2604,6 +2604,7 @@ ucl_object_merge (ucl_object_t *top, ucl_object_t *elt, bool copy) if (!ucl_object_merge (found, cp, copy)) { return false; } + ucl_object_unref (cp); } else { ucl_hash_replace (top->value.ov, found, cp); @@ -2635,6 +2636,7 @@ ucl_object_merge (ucl_object_t *top, ucl_object_t *elt, bool copy) if (!ucl_object_merge (found, cp, copy)) { return false; } + ucl_object_unref (cp); } else { ucl_hash_replace (top->value.ov, found, cp); |