EAP-PEAP peer: Fix a memory leak on an error path

If memory allocation for adding SoH response fails, the SoH response was
not freed properly on the error path.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-12-20 16:55:28 +02:00
parent 212d6a1732
commit 4f5c86e7bd

View file

@ -646,6 +646,7 @@ static int eap_peap_phase2_request(struct eap_sm *sm,
if (*resp == NULL) {
ret->methodState = METHOD_DONE;
ret->decision = DECISION_FAIL;
wpabuf_free(buf);
return -1;
}
wpabuf_put_buf(*resp, buf);