Commit Diff


commit - 2d7ce510f888e8d465497fade1733fbae71b6753
commit + dfe86d1fa6f81d3a709059eda591863efd8d5a34
blob - 6dd080eb395b1890c2edae59e78e5e795e2e0262
blob + 5e663edd2cd3e7e02e9b9ee302c595b926e20493
--- lib/worktree.c
+++ lib/worktree.c
@@ -7655,6 +7655,7 @@ got_worktree_merge_in_progress(int *in_progress, struc
 	if (err)
 		return err;
 	err = got_ref_open(&branch_ref, repo, branch_refname, 0);
+	free(branch_refname);
 	if (err) {
 		if (err->code != GOT_ERR_NOT_REF)
 			return err;