]> git.proxmox.com Git - libgit2.git/commit
buffer: rely on `GITERR_OOM` set by `git_buf_try_grow`
authorPatrick Steinhardt <ps@pks.im>
Wed, 7 Jun 2017 08:05:54 +0000 (10:05 +0200)
committerPatrick Steinhardt <ps@pks.im>
Thu, 8 Jun 2017 09:58:22 +0000 (11:58 +0200)
commit97eb5ef0262bc0acf2ce66481105960b79e10ed7
tree3dfdecd584ce89688d2b5b617dc36d4dc3033223
parentdd0aa811dd329f5040c70f7aac514b3757eb2453
buffer: rely on `GITERR_OOM` set by `git_buf_try_grow`

The function `git_buf_try_grow` consistently calls `giterr_set_oom`
whenever growing the buffer fails due to insufficient memory being
available. So in fact, we do not have to do this ourselves when a call
to any buffer-growing function has failed due to an OOM situation. But
we still do so in two functions, which this patch cleans up.
src/pack.c
src/transports/winhttp.c