use got_fileindex_free() to free a fileindex structure
diff --git a/lib/worktree.c b/lib/worktree.c
index 4fbd3aa..c68ca74 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -1429,7 +1429,7 @@ done:
if (err) {
free(*fileindex_path);
*fileindex_path = NULL;
- free(*fileindex);
+ got_fileindex_free(*fileindex);
*fileindex = NULL;
}
return err;