Commit 4f9327f
committed
treebuilder: fix memory leaks in
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.write_with_buffer
1 parent a25df00 commit 4f9327f
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
821 | | - | |
| 821 | + | |
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
829 | | - | |
830 | | - | |
| 829 | + | |
| 830 | + | |
831 | 831 | | |
832 | 832 | | |
833 | | - | |
834 | | - | |
| 833 | + | |
| 834 | + | |
835 | 835 | | |
836 | 836 | | |
837 | | - | |
838 | | - | |
| 837 | + | |
| 838 | + | |
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
| |||
855 | 855 | | |
856 | 856 | | |
857 | 857 | | |
| 858 | + | |
858 | 859 | | |
859 | 860 | | |
860 | 861 | | |
| |||
0 commit comments