mv: flatten error handling code block
[gitweb.git] / builtin / show-branch.c
index 5fd4e4e48839a9dc2998d3fba0e48008b902b12a..298c95e3f8b03e7f89d7767407ca8cee3eecc591 100644 (file)
@@ -777,6 +777,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
                        sprintf(nth_desc, "%s@{%d}", *av, base+i);
                        append_ref(nth_desc, sha1, 1);
                }
+               free(ref);
        }
        else if (all_heads + all_remotes)
                snarf_refs(all_heads, all_remotes);