commit 4f2b2d8: [Minor] Libucl: Backport fixes
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Apr 17 11:00:09 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-04-17 10:37:50 +0100
URL: https://github.com/rspamd/rspamd/commit/4f2b2d824f7c8d3d0d02dc995c81213d7a5c8026
[Minor] Libucl: Backport fixes
---
contrib/libucl/ucl_parser.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/contrib/libucl/ucl_parser.c b/contrib/libucl/ucl_parser.c
index b048f426a..5b5681863 100644
--- a/contrib/libucl/ucl_parser.c
+++ b/contrib/libucl/ucl_parser.c
@@ -461,12 +461,15 @@ ucl_expand_single_variable (struct ucl_parser *parser, const char *ptr,
}
if (!found) {
if (strict && parser->var_handler != NULL) {
- if (parser->var_handler (ptr, remain, &dst, &dstlen, &need_free,
+ if (parser->var_handler (p, remain, &dst, &dstlen, &need_free,
parser->var_data)) {
memcpy (d, dst, dstlen);
- ret += dstlen;
- d += remain;
+ ret += remain;
+ d += dstlen;
found = true;
+ if (need_free) {
+ free (dst);
+ }
}
}
More information about the Commits
mailing list