commit fbc05d22abd3750394d06b749e59b53eb2905a7e from: Stefan Sperling date: Sat Dec 28 13:55:37 2024 UTC make got-read-pack clear its imsgbuf before exiting in error cases commit - b6f8be123ccc243d925f8da04d5ff76e89e83fe3 commit + fbc05d22abd3750394d06b749e59b53eb2905a7e blob - 02824e8cfc0fa0fcfb71a91e9fdb9ecabf8545ec blob + 8049481513dd138d1818a8eb293862548487a4dd --- libexec/got-read-pack/got-read-pack.c +++ libexec/got-read-pack/got-read-pack.c @@ -2008,6 +2008,7 @@ main(int argc, char *argv[]) if (err) { err = got_error_from_errno("got_object_cache_init"); got_privsep_send_error(&ibuf, err); + imsgbuf_clear(&ibuf); return 1; } @@ -2016,6 +2017,7 @@ main(int argc, char *argv[]) if (pledge("stdio recvfd", NULL) == -1) { err = got_error_from_errno("pledge"); got_privsep_send_error(&ibuf, err); + imsgbuf_clear(&ibuf); return 1; } #endif @@ -2023,12 +2025,14 @@ main(int argc, char *argv[]) err = receive_packidx(&packidx, &ibuf); if (err) { got_privsep_send_error(&ibuf, err); + imsgbuf_clear(&ibuf); return 1; } err = receive_pack(&pack, &ibuf); if (err) { got_privsep_send_error(&ibuf, err); + imsgbuf_clear(&ibuf); return 1; }