Commit fe558a04addf51f90a50aef5e0e8405c26873f9b

Stefan Sperling 2020-01-06T15:58:23

plug a memory leak: got-read-commit forgot to close commits

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/libexec/got-read-commit/got-read-commit.c b/libexec/got-read-commit/got-read-commit.c
index 3ec8615..cf5f7b9 100644
--- a/libexec/got-read-commit/got-read-commit.c
+++ b/libexec/got-read-commit/got-read-commit.c
@@ -145,6 +145,7 @@ main(int argc, char *argv[])
 			goto done;
 
 		err = got_privsep_send_commit(&ibuf, commit);
+		got_object_commit_close(commit);
 done:
 		if (f) {
 			if (fclose(f) != 0 && err == NULL)