commit 93b39c2f4a792f8a83e7621425edbd48f0c16854 from: Stefan Sperling date: Fri Apr 26 21:23:40 2024 UTC fix an fd leak in gotd's notify process This leak resulted in the gotd notify process spinning on CPU in an imsg_read() -> EAGAIN loop once it ran out of file descriptors. commit - 1c8e2cfac8b0d421f5363b90eea492e5cd09940f commit + 93b39c2f4a792f8a83e7621425edbd48f0c16854 blob - 7847e850c8ce9f01d61ea2040c50c1ca94cc605b blob + cc0b17db44d592bb3d0b20f73b44556cac260e9c --- gotd/notify.c +++ gotd/notify.c @@ -118,6 +118,7 @@ remove_session(struct gotd_notify_session *session) slot = session_hash(session->id) % nitems(gotd_notify_sessions); STAILQ_REMOVE(&gotd_notify_sessions[slot], session, gotd_notify_session, entry); + close(session->iev.ibuf.fd); free(session); }