summaryrefslogtreecommitdiff
path: root/src/diff_patch.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-02-22 13:48:45 +0100
committerPatrick Steinhardt <ps@pks.im>2016-02-23 11:50:23 +0100
commitbac52ab0f2e8d09de1f98590f177e9e847cdb11b (patch)
treec7913acd1a48cf07a11abb439e00f96128b2075a /src/diff_patch.h
parentd1c9a48df667d6c83cca2ad21b1200fb65d7a1c6 (diff)
downloadlibgit2-bac52ab0f2e8d09de1f98590f177e9e847cdb11b.tar.gz
pack-objects: return early when computing write order fails
The function `compute_write_order` may return a `NULL`-pointer when an error occurs. In such cases we jump to the `done`-label where we try to clean up allocated memory. Unfortunately we try to deallocate the `write_order` array, though, which may be NULL here. Fix this error by returning early instead of jumping to the `done` label. There is no data to be cleaned up anyway.
Diffstat (limited to 'src/diff_patch.h')
0 files changed, 0 insertions, 0 deletions