Commit Diff


commit - 62ee7d94746d0e54c308e112e3b47dcd1bf294f9
commit + 42de9bd19210157b96f7ec4a7727af30e8d54b73
blob - 373ce90b8c88da56713540961da644b3b28c4984
blob + e7f9752fa3321b4f2a730099f559505a4d4a5a93
--- got/got.c
+++ got/got.c
@@ -6800,7 +6800,7 @@ add_branch(struct got_repository *repo, const char *br
 {
 	const struct got_error *err = NULL;
 	struct got_reference *ref = NULL;
-	char *base_refname = NULL, *refname = NULL;
+	char *refname = NULL;
 
 	/*
 	 * Don't let the user create a branch name with a leading '-'.
@@ -6833,7 +6833,6 @@ add_branch(struct got_repository *repo, const char *br
 done:
 	if (ref)
 		got_ref_close(ref);
-	free(base_refname);
 	free(refname);
 	return err;
 }