commit f0a58e8988234f4595ddc5deb1c38d5aa2408492 from: Stefan Sperling date: Sat Dec 28 09:18:05 2024 UTC call imsgbuf_clear() on ibufs before freeing them commit - 2bd3f682a00bcdbcd3cddafb512e128cc757e47a commit + f0a58e8988234f4595ddc5deb1c38d5aa2408492 blob - ed36f2076d71d7ed6931ebfd54eac2aa82fc6264 blob + 0258f1df3dcad137a19421f6c9b65c513b5b6efe --- lib/pack.c +++ lib/pack.c @@ -803,6 +803,7 @@ got_pack_start_privsep_child(struct got_pack *pack, st } done: if (err) { + imsgbuf_clear(ibuf); free(ibuf); free(pack->privsep_child); pack->privsep_child = NULL; blob - 75703efda614edb50b99c61d38dc6e1f8f4aa721 blob + 1383324346b66adf41e2c9542956187a27b2cdf9 --- lib/read_gitconfig_privsep.c +++ lib/read_gitconfig_privsep.c @@ -207,6 +207,7 @@ done: err = got_error_from_errno("close"); if (fd != -1 && close(fd) == -1 && err == NULL) err = got_error_from_errno2("close", gitconfig_path); + imsgbuf_clear(ibuf); free(ibuf); return err; } blob - e7e9f64f55def2db5c0fae271d51045ceb97810e blob + 70c6265c3781e01cedf23fba2769c037a95528b0 --- lib/read_gotconfig_privsep.c +++ lib/read_gotconfig_privsep.c @@ -159,6 +159,7 @@ done: got_gotconfig_free(*conf); *conf = NULL; } + imsgbuf_clear(ibuf); free(ibuf); return err; }