sd-netlink: fix assertion triggered by message_get_serial()
This fixes an issue introduced by 7b34bae3b1.
Fixes https://github.com/systemd/systemd/pull/25565#issuecomment-1331353945.
This commit is contained in:
committed by
Frantisek Sumsal
parent
f3c8cb27b1
commit
6b15f2eff9
@@ -187,7 +187,8 @@ static int dispatch_rqueue(sd_netlink *nl, sd_netlink_message **ret) {
|
||||
|
||||
/* Dispatch a queued message */
|
||||
m = ordered_set_steal_first(nl->rqueue);
|
||||
sd_netlink_message_unref(hashmap_remove_value(nl->rqueue_by_serial, UINT32_TO_PTR(message_get_serial(m)), m));
|
||||
if (m)
|
||||
sd_netlink_message_unref(hashmap_remove_value(nl->rqueue_by_serial, UINT32_TO_PTR(message_get_serial(m)), m));
|
||||
*ret = m;
|
||||
return !!m;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user