Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ucl_expand_single_variable doesn't call free #220

Merged
merged 1 commit into from
Apr 12, 2020

Conversation

andoriyu
Copy link
Contributor

ucl_expand_single_variable doesn't free dst even if need_free set to true and that leaks memory.

ucl_expand_single_variable doesn't free `dst` even if `need_free` set to true and that leaks memory.
@vstakhov
Copy link
Owner

Good catch, thank you!

@vstakhov vstakhov merged commit cba680e into vstakhov:master Apr 12, 2020
@andoriyu
Copy link
Contributor Author

@vstakhov there still something not right with that code path. I a few tests that interact with variables: one with static substitution and other with var_handler.

When all tests executed one by one on the same thread last test has wrong value in the object.

If I under correctly when I add chunk to parser, I don't have to keep memory alive because parser will copy it. Same for for variables. But my resulting object endup having a few bytes either from another test key or another test value - depends on the order tests are executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants