From: Eric Sunshine Date: Fri, 31 Jul 2020 23:32:11 +0000 (-0400) Subject: worktree: drop pointless strbuf_release() X-Git-Tag: v2.29.0-rc0~189^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62573a57f0919f4d1129962b09462946e69025ff;p=thirdparty%2Fgit.git worktree: drop pointless strbuf_release() The content of this strbuf is unconditionally detached several lines before the strbuf_release() and the strbuf is never touched again after that point. Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- diff --git a/worktree.c b/worktree.c index cba2e54598..c0df5e2c79 100644 --- a/worktree.c +++ b/worktree.c @@ -66,8 +66,6 @@ static struct worktree *get_main_worktree(void) worktree->is_bare = (is_bare_repository_cfg == 1) || is_bare_repository(); add_head_info(worktree); - - strbuf_release(&worktree_path); return worktree; }