plug fd leak in got_pack_stop_privsep_child()
diff --git a/lib/pack.c b/lib/pack.c
index 94d6d9c..5de6375 100644
--- a/lib/pack.c
+++ b/lib/pack.c
@@ -496,6 +496,8 @@ got_pack_stop_privsep_child(struct got_pack *pack)
if (err)
return err;
err = got_privsep_wait_for_child(pack->privsep_child->pid);
+ if (close(pack->privsep_child->imsg_fd) != 0 && err == NULL)
+ err = got_error_from_errno();
free(pack->privsep_child);
pack->privsep_child = NULL;
return err;