]> git.ipfire.org Git - thirdparty/hostap.git/commit - src/radius/radius_server.c
RADIUS server: Fix error paths in new session creation
authorJouni Malinen <j@w1.fi>
Sun, 5 Mar 2017 14:16:42 +0000 (16:16 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 5 Mar 2017 14:18:57 +0000 (16:18 +0200)
commitde01f254a61a4432ba89f3a5dc950d8678021d44
tree4fa36f076c585fa6d2aa58866cf2f8f5efd069a4
parenta47f214e3f6a20b0afa5cd746632de000f8677b8
RADIUS server: Fix error paths in new session creation

radius_server_session_free() does not remove the session from the
session list and these radius_server_get_new_session() error paths ended
up leaving a pointer to freed memory into the session list. This
resulted in the following operations failing due to use of freed memory.

Fix this by using radius_server_session_remove() which removes the entry
from the list in addition to calling radius_server_session_free().

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