diff options
-rw-r--r-- | src/pack-objects.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pack-objects.c b/src/pack-objects.c index 46fe8f3db..11e13f7d4 100644 --- a/src/pack-objects.c +++ b/src/pack-objects.c @@ -848,8 +848,10 @@ static int try_delta(git_packbuilder *pb, struct unpacked *trg, git_packbuilder__cache_unlock(pb); - if (overflow) + if (overflow) { + git__free(delta_buf); return -1; + } trg_object->delta_data = git__realloc(delta_buf, delta_size); GITERR_CHECK_ALLOC(trg_object->delta_data); |