Skip to content

Commit 21e0fc3

Browse files
committed
Plug a leak in the refs compressor
1 parent 904e1e7 commit 21e0fc3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/refdb_fs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,7 @@ static int packed_remove_loose(refdb_fs_backend *backend)
927927
continue;
928928

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

961+
git_buf_free(&ref_content);
960962
git_filebuf_cleanup(&lock);
961963
return 0;
962964
}

0 commit comments

Comments
 (0)