check-ref-format: release strbuf after use in check_ref_format_branch()
authorRene Scharfe <l.s.r@web.de>
Wed, 30 Aug 2017 17:49:35 +0000 (19:49 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Sep 2017 23:49:26 +0000 (08:49 +0900)
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/check-ref-format.c
index eac499450f63554387fb8b32ef5780c32ded4a21..6c40ff110bee7387d4eb4e9c7c04a21e8b12ca44 100644 (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;
 }