Commit Diff


commit - bd00a07c62ad3b363bcd50c100f4b45b9e452d02
commit + 678cfb9b87e886cfa180bf01335908e0e4acba1a
blob - 68e48a0e81d4d3c15d2ddcf8300302b93d22fab4
blob + 2bafcaf1ce32c0c0acb7afe62701ecb9e576c008
--- got/got.c
+++ got/got.c
@@ -2993,7 +2993,6 @@ cmd_checkout(int argc, char *argv[])
 		error = check_linear_ancestry(commit_id,
 		    got_worktree_get_base_commit_id(worktree), 0, repo);
 		if (error != NULL) {
-			free(commit_id);
 			if (error->code == GOT_ERR_ANCESTRY) {
 				error = checkout_ancestry_error(
 				    head_ref, commit_id_str);