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>