Thread (164 messages) flat view 164 messages, 7 authors, 2021-09-18
STALE1818d

Revision v4 of 4 in this series.

Revisions (4)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 current

[PATCH v4 09/16] midx: don't free midx_name early

From: Taylor Blau <hidden>
Date: 2021-03-30 15:05:22
Subsystem: the rest · Maintainer: Linus Torvalds

A subsequent patch will need to refer back to 'midx_name' later on in
the function. In fact, this variable is already free()'d later on, so
this makes the later free() no longer redundant.

Signed-off-by: Taylor Blau <redacted>
---
 midx.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/midx.c b/midx.c
index 4a9d84352c..3edde2b68d 100644
--- a/midx.c
+++ b/midx.c
@@ -956,7 +956,6 @@ static int write_midx_internal(const char *object_dir, struct multi_pack_index *
 
 	hold_lock_file_for_update(&lk, midx_name, LOCK_DIE_ON_ERROR);
 	f = hashfd(get_lock_file_fd(&lk), get_lock_file_path(&lk));
-	FREE_AND_NULL(midx_name);
 
 	if (ctx.m)
 		close_midx(ctx.m);
-- 
2.30.0.667.g81c0cbc6fd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help