[PATCH 2/6] fixup! Add reftable library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johannes Schindelin <johannes.schindelin@xxxxxx>

Do close the file descriptors to obsolete files before trying to delete
them. This is actually required on Windows.

Note: this patch is probably a bit heavy-handed, releasing more than
necessary (which will then have to be re-read). But it seems to be
enough to let t0031 pass on Windows, so it is at least a clue as to what
the fix will look like eventually.

Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
---
 reftable/stack.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/reftable/stack.c b/reftable/stack.c
index 2e32f7671c2..3c5f4a43130 100644
--- a/reftable/stack.c
+++ b/reftable/stack.c
@@ -941,6 +941,10 @@ static int stack_compact_range(struct reftable_stack *st, int first, int last,
 	}
 	have_lock = false;
 
+	reftable_merged_table_close(st->merged);
+	merged_table_clear(st->merged);
+	reftable_merged_table_free(st->merged);
+	st->merged = NULL;
 	{
 		char **p = delete_on_success;
 		while (*p) {
-- 
gitgitgadget




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux