Fix potential double free and use of freed memory in RADIUS client
authorAlexander Couzens <lynxis@c-base.org>
Sun, 1 Apr 2012 10:36:52 +0000 (13:36 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 1 Apr 2012 10:36:52 +0000 (13:36 +0300)
commita4e73a0e470cde6fcf3983aca277f01540bb37fa
treef1b55f8dfa8da779a280ea22865a48681322fa2a
parentda873dbb0631ffbb3186dfbabb029cf79e829cd8
Fix potential double free and use of freed memory in RADIUS client

ieee802_1x_encapsulate_radius() frees the RADIUS message if
radius_client_send() returns error. This could have resulted in use of
freed memory and double freeing of the RADIUS message if send() fails
since the message is also left in the retransmit list. Avoid this by not
returning error to the caller in such a case.

Signed-off-by: Alexander Couzens <lynxis@c-base.org>
src/radius/radius_client.c