Skip to content

Commit

Permalink
Plug a leak in the refs compressor
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmn committed Nov 14, 2016
1 parent 904e1e7 commit 21e0fc3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/refdb_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,7 @@ static int packed_remove_loose(refdb_fs_backend *backend)
continue;

if (error < 0) {
git_buf_free(&ref_content);
giterr_set(GITERR_REFERENCE, "failed to lock loose reference '%s'", ref->name);
return error;
}
Expand Down Expand Up @@ -957,6 +958,7 @@ static int packed_remove_loose(refdb_fs_backend *backend)
p_unlink(lock.path_original);
}

git_buf_free(&ref_content);
git_filebuf_cleanup(&lock);
return 0;
}
Expand Down

0 comments on commit 21e0fc3

Please sign in to comment.