diff options
author | Edward Thomson <ethomson@github.com> | 2016-11-14 19:21:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-14 19:21:56 +0000 |
commit | 1d683c1d2e36631cfe7ff7e9fa930b0773604000 (patch) | |
tree | bcb9b952a0a0286e625bba9b4671ca257fcdbc40 | |
parent | a39f18ac770e1a4bac72212236614db57c1de5be (diff) | |
parent | 21e0fc32abe6e73a5efc5c4401da69e2c133b099 (diff) | |
download | libgit2-1d683c1d2e36631cfe7ff7e9fa930b0773604000.tar.gz |
Merge pull request #4006 from libgit2/cmn/compress-buf-free
Plug a leak in the refs compressor
-rw-r--r-- | src/refdb_fs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/refdb_fs.c b/src/refdb_fs.c index 7601aa0ac..558d06094 100644 --- a/src/refdb_fs.c +++ b/src/refdb_fs.c @@ -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; } @@ -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; } |