Skip to content

Commit

Permalink
Fix issue with setting length when parsing vars
Browse files Browse the repository at this point in the history
Issue: #287
  • Loading branch information
vstakhov committed Apr 20, 2024
1 parent 675ab32 commit 0820e70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ucl_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ ucl_check_variable_safe (struct ucl_parser *parser, const char *ptr, size_t rema
if (parser->var_handler (ptr, remain, &dst, &dstlen, &need_free,
parser->var_data)) {
*found = true;
*out_len = dstlen;

if (need_free) {
free (dst);
}
Expand Down

0 comments on commit 0820e70

Please sign in to comment.