Commit 486cd271536d13bdd204143922fc527bd7b28952

Stefan Sperling 2020-12-06T20:12:42

plug leak of ref in cmd_tree(); found by naddy

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tog/tog.c b/tog/tog.c
index 7c2c366..7a0e74a 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -5567,6 +5567,8 @@ done:
 	free(cwd);
 	free(commit_id);
 	free(label);
+	if (ref)
+		got_ref_close(ref);
 	if (commit)
 		got_object_commit_close(commit);
 	if (tree)