check-ref-format: release strbuf after use in check_ref_format_branch()

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Rene Scharfe 2017-08-30 19:49:35 +02:00 committed by Junio C Hamano
parent 28ac7aa79b
commit 861e65557f

View File

@ -45,6 +45,7 @@ static int check_ref_format_branch(const char *arg)
if (strbuf_check_branch_ref(&sb, arg))
die("'%s' is not a valid branch name", arg);
printf("%s\n", sb.buf + 11);
strbuf_release(&sb);
return 0;
}