Commit cc2a8ef4d11a18e731acc4e3af92748ead29505b

Tracey Emery 2021-06-19T16:12:52

fix a leaky ibuf. ok stsp

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/pack.c b/lib/pack.c
index 1372173..0024c0e 100644
--- a/lib/pack.c
+++ b/lib/pack.c
@@ -552,6 +552,8 @@ got_pack_stop_privsep_child(struct got_pack *pack)
 	err = got_privsep_wait_for_child(pack->privsep_child->pid);
 	if (close(pack->privsep_child->imsg_fd) == -1 && err == NULL)
 		err = got_error_from_errno("close");
+	imsg_clear(pack->privsep_child->ibuf);
+	free(pack->privsep_child->ibuf);
 	free(pack->privsep_child);
 	pack->privsep_child = NULL;
 	return err;