summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-03-27 13:14:48 +0200
committerPatrick Steinhardt <ps@pks.im>2017-03-28 08:39:29 +0200
commit06abbb7f07c64e877ffa87ae4614ae5f4e933435 (patch)
treedb01d0586a75eaec8875c6a4e90db93cdc4d9f49 /include/git2
parent8d1e71f5a24106bfeb4d6ff767708dd40e4a58dd (diff)
downloadlibgit2-06abbb7f07c64e877ffa87ae4614ae5f4e933435.tar.gz
treebuilder: exit early if running OOM in `write_with_buffer`
While writing the tree inside of a buffer, we check whether the buffer runs out of memory after each tree entry. While we set the error code as soon as we detect the OOM situation, we happily proceed iterating over the entries. This is not useful at all, as we will try to write into the buffer repeatedly, which cannot work. Fix this by exiting as soon as we are OOM.
Diffstat (limited to 'include/git2')
0 files changed, 0 insertions, 0 deletions