Merge pull request #3575 from pmq20/master-13jan16 Remove duplicated calls to git_mwindow_close
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
diff --git a/src/indexer.c b/src/indexer.c
index ce03925..a3a8669 100644
--- a/src/indexer.c
+++ b/src/indexer.c
@@ -777,7 +777,6 @@ static int fix_thin_pack(git_indexer *idx, git_transfer_progress *stats)
curpos = delta->delta_off;
error = git_packfile_unpack_header(&size, &type, &idx->pack->mwf, &w, &curpos);
- git_mwindow_close(&w);
if (error < 0)
return error;
diff --git a/src/pack.c b/src/pack.c
index e8bde71..e7003e6 100644
--- a/src/pack.c
+++ b/src/pack.c
@@ -494,7 +494,6 @@ int git_packfile_resolve_header(
int error;
error = git_packfile_unpack_header(&size, &type, &p->mwf, &w_curs, &curpos);
- git_mwindow_close(&w_curs);
if (error < 0)
return error;
@@ -517,7 +516,6 @@ int git_packfile_resolve_header(
while (type == GIT_OBJ_OFS_DELTA || type == GIT_OBJ_REF_DELTA) {
curpos = base_offset;
error = git_packfile_unpack_header(&size, &type, &p->mwf, &w_curs, &curpos);
- git_mwindow_close(&w_curs);
if (error < 0)
return error;
if (type != GIT_OBJ_OFS_DELTA && type != GIT_OBJ_REF_DELTA)
@@ -585,7 +583,6 @@ static int pack_dependency_chain(git_dependency_chain *chain_out,
elem->base_key = obj_offset;
error = git_packfile_unpack_header(&size, &type, &p->mwf, &w_curs, &curpos);
- git_mwindow_close(&w_curs);
if (error < 0)
goto on_error;