From: Taylor Blau Date: Wed, 24 Feb 2021 19:09:58 GMT Subject: [PATCH v2 09/15] midx: don't free midx_name early Message-ID: <976848bc4b40f1d1e7cdef5e5cf031ecd9f1ac0f.1614193703.git.me@ttaylorr.com> In-Reply-To: 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 --- midx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/midx.c b/midx.c index d2c56c4bc6..db043d3e65 100644 --- a/midx.c +++ b/midx.c @@ -973,7 +973,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