Commit b87b4170d4b402d61585cf4d458c0b58ab49095f

Stefan Sperling 2020-01-06T14:10:36

rename to parsed_tree_entries_free for clarity (don't use with got_tree_object)

diff --git a/lib/got_lib_object_parse.h b/lib/got_lib_object_parse.h
index 9a940e3..e6c2ea9 100644
--- a/lib/got_lib_object_parse.h
+++ b/lib/got_lib_object_parse.h
@@ -34,7 +34,7 @@ struct got_parsed_tree_entry {
 };
 const struct got_error *got_object_parse_tree(struct got_pathlist_head *, int *,
     uint8_t *, size_t);
-void got_object_tree_entries_free(struct got_pathlist_head *);
+void got_object_parsed_tree_entries_free(struct got_pathlist_head *);
 
 const struct got_error *got_object_parse_tag(struct got_tag_object **,
     uint8_t *, size_t);
diff --git a/lib/object_parse.c b/lib/object_parse.c
index 3449f6b..b13f101 100644
--- a/lib/object_parse.c
+++ b/lib/object_parse.c
@@ -719,14 +719,14 @@ got_object_parse_tree(struct got_pathlist_head *entries, int *nentries,
 	}
 done:
 	if (err) {
-		got_object_tree_entries_free(entries);
+		got_object_parsed_tree_entries_free(entries);
 		*nentries = 0;
 	}
 	return err;
 }
 
 void
-got_object_tree_entries_free(struct got_pathlist_head *entries)
+got_object_parsed_tree_entries_free(struct got_pathlist_head *entries)
 {
 	struct got_pathlist_entry *pe;
 
diff --git a/libexec/got-read-pack/got-read-pack.c b/libexec/got-read-pack/got-read-pack.c
index 9e71e26..72b14bc 100644
--- a/libexec/got-read-pack/got-read-pack.c
+++ b/libexec/got-read-pack/got-read-pack.c
@@ -203,7 +203,7 @@ tree_request(struct imsg *imsg, struct imsgbuf *ibuf, struct got_pack *pack,
 
 	err = got_privsep_send_tree(ibuf, &entries, nentries);
 done:
-	got_object_tree_entries_free(&entries);
+	got_object_parsed_tree_entries_free(&entries);
 	free(buf);
 	got_object_close(obj);
 	if (err) {
diff --git a/libexec/got-read-tree/got-read-tree.c b/libexec/got-read-tree/got-read-tree.c
index 3607590..13b651a 100644
--- a/libexec/got-read-tree/got-read-tree.c
+++ b/libexec/got-read-tree/got-read-tree.c
@@ -143,7 +143,7 @@ main(int argc, char *argv[])
 
 		err = got_privsep_send_tree(&ibuf, &entries, nentries);
 done:
-		got_object_tree_entries_free(&entries);
+		got_object_parsed_tree_entries_free(&entries);
 		free(buf);
 		if (f) {
 			if (fclose(f) != 0 && err == NULL)