eap-md5: Avoid memory leak caused by repeated challenges
Fixes: 4b403e7672 ("merged EAP-MD5 into trunk")
This commit is contained in:
@@ -157,6 +157,7 @@ METHOD(eap_method_t, process_peer, status_t,
|
|||||||
DBG1(DBG_IKE, "received invalid EAP-MD5 message");
|
DBG1(DBG_IKE, "received invalid EAP-MD5 message");
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
|
chunk_free(&this->challenge);
|
||||||
this->challenge = chunk_clone(chunk_create(data.ptr + 6, data.ptr[5]));
|
this->challenge = chunk_clone(chunk_create(data.ptr + 6, data.ptr[5]));
|
||||||
if (hash_challenge(this, &response, this->peer, this->server) != SUCCESS)
|
if (hash_challenge(this, &response, this->peer, this->server) != SUCCESS)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user