Thread (1 message) 1 message, 1 author, 2022-03-25

Re: [PATCH v2 14/27] revisions API users: use release_revisions() in submodule.c edge case

From: Junio C Hamano <hidden>
Date: 2022-03-25 01:07:59

Ævar Arnfjörð Bjarmason  [off-list ref] writes:
quoted hunk
diff --git a/submodule.c b/submodule.c
index 0510cb193b6..285c1896c9e 100644
--- a/submodule.c
+++ b/submodule.c
@@ -638,7 +638,7 @@ void show_submodule_diff_summary(struct diff_options *o, const char *path,
 		struct object_id *one, struct object_id *two,
 		unsigned dirty_submodule)
 {
-	struct rev_info rev;
+	struct rev_info rev = { 0 };
Exactly the same comment as an earlier step about bundle and bisect
applies here.
quoted hunk
 	struct commit *left = NULL, *right = NULL;
 	struct commit_list *merge_bases = NULL;
 	struct repository *sub;
@@ -664,6 +664,7 @@ void show_submodule_diff_summary(struct diff_options *o, const char *path,
 	print_submodule_diff_summary(sub, &rev, o);
 
 out:
+	release_revisions(&rev);
 	if (merge_bases)
 		free_commit_list(merge_bases);
 	clear_commit_marks(left, ~0);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help