Commit Diff


commit - ca114b13c896eb3d05de11e08ba4aff1fce3f84f11c931326475926a7cc8cd33
commit + 3bbc1cb064572c543541e809cafc878b5ee1abf14e08b2b00f6c5a44ca1e6d9b
blob - 71f53bfdd4b85b66f3851c10821fdf81bf0bcc9d591c1e7510542d4fa1f357db
blob + 1d798928db8c8b86504b475d445634d7f6d2fef6311cc63b2f56b4bf1706a25b
--- lib/worktree.c	
+++ lib/worktree.c	
@@ -7457,6 +7457,7 @@ rebase_commit(struct got_object_id **new_commit_id,
 	struct got_reference *head_ref = NULL;
 	struct got_object_id *head_commit_id = NULL;
 	char *logmsg = NULL;
+	struct got_pathlist_entry *pe;
 
 	memset(&cc_arg, 0, sizeof(cc_arg));
 	RB_INIT(&commitable_paths);
@@ -7554,6 +7555,12 @@ rebase_commit(struct got_object_id **new_commit_id,
 	if (sync_err && err == NULL)
 		err = sync_err;
 done:
+	RB_FOREACH(pe, got_pathlist_head, &commitable_paths) {
+		struct got_commitable *ct = pe->data;
+
+		free_commitable(ct);
+	}
+	got_pathlist_free(&commitable_paths, GOT_PATHLIST_FREE_NONE);
 	free(fileindex_path);
 	free(head_commit_id);
 	if (head_ref)