mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix elements not being removed in otpd_queue_pop_msgid()
If the element being removed were not the queue head, otpd_queue_pop_msgid() would not actually remove the element, leading to potential double frees and request replays. Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
parent
3e4b9cd969
commit
a2e8d989a3
@ -155,7 +155,7 @@ struct otpd_queue_item *otpd_queue_pop_msgid(struct otpd_queue *q, int msgid)
|
||||
|
||||
for (item = q->head, prev = &q->head;
|
||||
item != NULL;
|
||||
item = item->next, prev = &item->next) {
|
||||
prev = &item->next, item = item->next) {
|
||||
if (item->msgid == msgid) {
|
||||
*prev = item->next;
|
||||
if (q->head == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user