Commit Diff


commit - 5ade8233f4089c3f88f175be2fcedda9595fe842
commit + fb399478ba035edc9852bd7340a9f4ffee06e79a
blob - 9948e88721de975b38546a1ede8b343374dea52d
blob + 21986f39664d20f4d0da79e18aaaee215efae8d0
--- lib/worktree.c
+++ lib/worktree.c
@@ -2259,6 +2259,7 @@ got_worktree_schedule_add(struct got_worktree *worktre
 	if (sync_err && err == NULL)
 		err = sync_err;
 done:
+	free(fileindex_path);
 	if (fileindex)
 		got_fileindex_free(fileindex);
 	unlockerr = lock_worktree(worktree, LOCK_SH);
@@ -2337,6 +2338,7 @@ got_worktree_schedule_delete(struct got_worktree *work
 	if (sync_err && err == NULL)
 		err = sync_err;
 done:
+	free(fileindex_path);
 	if (fileindex)
 		got_fileindex_free(fileindex);
 	unlockerr = lock_worktree(worktree, LOCK_SH);
@@ -2503,6 +2505,7 @@ got_worktree_revert(struct got_worktree *worktree,
 	if (sync_err && err == NULL)
 		err = sync_err;
 done:
+	free(fileindex_path);
 	if (fileindex)
 		got_fileindex_free(fileindex);
 	unlockerr = lock_worktree(worktree, LOCK_SH);