Commit 9ca7a60e68d72d6e1da6eac519de48ecfca6d7f1

Patrick Steinhardt 2019-08-27T10:36:20

iterator: avoid leaving partially initialized frame on stack When allocating tree iterator entries, we use GIT_ERROR_ALLOC_CHECK` to check whether the allocation has failed. The macro will cause the function to immediately return, though, leaving behind a partially initialized iterator frame. Fix the issue by manually checking for memory allocation errors and using `goto done` in case of an error, popping the iterator frame.