treebuilder: fix memory leaks in `write_with_buffer`
While we detect errors in `git_treebuilder_write_with_buffer`, we just exit directly instead of freeing allocated memory. Fix this by remembering error codes and skipping forward to the function's cleanup code.
Showing
Please
register
or
sign in
to comment