RADIUS client: Fix previous failover change
authorJouni Malinen <j@w1.fi>
Sat, 28 Feb 2015 18:52:08 +0000 (20:52 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 28 Feb 2015 18:52:08 +0000 (20:52 +0200)
commit70fd8287eb3b1a62c6a7e78db511f1cc9ba43836
tree72a65f9d547c04be70ac2dedbc601e5b9c251e97
parentdcd378ed2e46f6716d0c06cb9ef6e9e6cbb4da5b
RADIUS client: Fix previous failover change

Commit 347c55e216f22002246e378097a16ecb24b7c106 ('RADIUS client: Re-try
connection if socket is closed on retransmit') added a possibility of
executing RADIUS server failover change within
radius_client_retransmit() without taking into account that this
operation may end up freeing the pending message that is being
processed. This could result in use of freed memory. Avoid this by
checking whether any pending messages have been removed and if so, do
not try to retransmit the potentially freed message.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/radius/radius_client.c