From 24b06511e2483a81445d0ab73b9fe2b041d5b1d4 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 19 Apr 2019 16:43:14 +0300 Subject: [PATCH] EAP-SAKE server: Fix memory freeing on error path Allocated struct wpabuf was freed with incorrect freeing function. Fix this by using the appropriate function. Signed-off-by: Jouni Malinen --- src/eap_server/eap_server_sake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eap_server/eap_server_sake.c b/src/eap_server/eap_server_sake.c index 66183f5f5..cda6b2f0f 100644 --- a/src/eap_server/eap_server_sake.c +++ b/src/eap_server/eap_server_sake.c @@ -204,7 +204,7 @@ static struct wpabuf * eap_sake_build_confirm(struct eap_sm *sm, { wpa_printf(MSG_INFO, "EAP-SAKE: Failed to compute MIC"); data->state = FAILURE; - os_free(msg); + wpabuf_free(msg); return NULL; }