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:
parent
212d6a1732
commit
4f5c86e7bd
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue