Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure valuess are used/copied before they are freed
While reviewing src/parser.y, I noticed that in a bunch of places the code relied on arguments being evaluated in a certain order. This seemingly is not currently causing problems, but with func(foo(jv_copy($1)), bar($1)); func(foo(jv_string_value($1)), bar($1)); It is not guaranteed that jv_copy()/jv_string_value() is evaluated before bar(). This patch splits those function calls into multiple statements to ensures values are used/copied before they are freed where necessary.
- Loading branch information