Merge pull request #4880 from Alexays/copilot/fix-mpd-module-crash

mpd: fix socket FD leak on system-level connection errors
This commit is contained in:
Alexis Rouillard
2026-02-24 00:06:11 +01:00
committed by GitHub

View File

@ -323,6 +323,7 @@ void waybar::modules::MPD::checkErrors(mpd_connection* conn) {
case MPD_ERROR_SYSTEM:
if (auto ec = mpd_connection_get_system_error(conn); ec != 0) {
mpd_connection_clear_error(conn);
connection_.reset();
throw std::system_error(ec, std::system_category());
}
G_GNUC_FALLTHROUGH;