commit 63bf3e483ff85bb146c97248faef8b97942d274883966048b66bcc9360dd572f from: Kyle Ackerman date: Thu Apr 9 02:07:28 2026 UTC Plug a memory leak in libexec got-read-commit When got-read-commit receives an imsg of type GOT_IMSG_STOP, it attempts to exit the main loop and leaks the last imsg. This commmit frees the the imsg before breaking from the main loop. ok stsp@ commit - 44f664b17ed79e4c7c4f23ca3c014101e8a70485f0864f45e4b75ccbeae4c0c9 commit + 63bf3e483ff85bb146c97248faef8b97942d274883966048b66bcc9360dd572f blob - d2fcbd32e228e2a3f1b61df59de6c6deb4be4ff11befa2ef8548e19d87ea794c blob + b691f94ebb32cd35f3c89e944dfba0511e83158d546edcc4a2958c832f99bf85 --- libexec/got-read-commit/got-read-commit.c +++ libexec/got-read-commit/got-read-commit.c @@ -94,8 +94,10 @@ main(int argc, char *argv[]) break; } - if (imsg.hdr.type == GOT_IMSG_STOP) + if (imsg.hdr.type == GOT_IMSG_STOP) { + imsg_free(&imsg); break; + } if (imsg.hdr.type != GOT_IMSG_COMMIT_REQUEST) { err = got_error(GOT_ERR_PRIVSEP_MSG);