diff options
| author | Patrick Steinhardt <ps@pks.im> | 2016-02-22 13:48:45 +0100 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2016-02-23 11:50:23 +0100 |
| commit | bac52ab0f2e8d09de1f98590f177e9e847cdb11b (patch) | |
| tree | c7913acd1a48cf07a11abb439e00f96128b2075a /src/diff_patch.h | |
| parent | d1c9a48df667d6c83cca2ad21b1200fb65d7a1c6 (diff) | |
| download | libgit2-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
