]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-netlink: disconnect the slot on async/match error paths
authorLuca Boccassi <luca.boccassi@gmail.com>
Thu, 2 Jul 2026 17:58:11 +0000 (18:58 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 6 Jul 2026 12:42:22 +0000 (13:42 +0100)
commit25c016f472b775cd6d8bcf7fd29506663cbf81de
tree6ccc19034e06e913d8dfb5642968a45e93cab71f
parent9cae6d9c565e820d9a5bf0b35c8b73b6004553bb
sd-netlink: disconnect the slot on async/match error paths

netlink_slot_allocate() links the slot into nl->slots and takes an nl
reference, but sd_netlink_call_async() and netlink_add_match_internal()
hold it in a _cleanup_free_, so an error after allocation frees the slot
with a bare free()

Follow-up for ee38400bbaf04ff093c5450a554d5cc70face217
src/libsystemd/sd-netlink/sd-netlink.c