imv-attestation: Fix memory leaks when creating functional components
This commit is contained in:
@@ -603,8 +603,8 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result,
|
|||||||
if (!comp)
|
if (!comp)
|
||||||
{
|
{
|
||||||
comp_name->log(comp_name, "unregistered ");
|
comp_name->log(comp_name, "unregistered ");
|
||||||
comp_name->destroy(comp_name);
|
|
||||||
}
|
}
|
||||||
|
comp_name->destroy(comp_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do TPM IMA measurements */
|
/* do TPM IMA measurements */
|
||||||
@@ -620,8 +620,8 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result,
|
|||||||
if (!comp)
|
if (!comp)
|
||||||
{
|
{
|
||||||
comp_name->log(comp_name, "unregistered ");
|
comp_name->log(comp_name, "unregistered ");
|
||||||
comp_name->destroy(comp_name);
|
|
||||||
}
|
}
|
||||||
|
comp_name->destroy(comp_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do TPM TRUSTED BOOT measurements */
|
/* do TPM TRUSTED BOOT measurements */
|
||||||
@@ -637,8 +637,8 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result,
|
|||||||
if (!comp)
|
if (!comp)
|
||||||
{
|
{
|
||||||
comp_name->log(comp_name, "unregistered ");
|
comp_name->log(comp_name, "unregistered ");
|
||||||
comp_name->destroy(comp_name);
|
|
||||||
}
|
}
|
||||||
|
comp_name->destroy(comp_name);
|
||||||
}
|
}
|
||||||
attestation_state->set_handshake_state(attestation_state,
|
attestation_state->set_handshake_state(attestation_state,
|
||||||
IMV_ATTESTATION_STATE_NONCE_REQ);
|
IMV_ATTESTATION_STATE_NONCE_REQ);
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ struct imv_attestation_state_t {
|
|||||||
/**
|
/**
|
||||||
* Create and add an entry to the list of Functional Components
|
* Create and add an entry to the list of Functional Components
|
||||||
*
|
*
|
||||||
* @param name Component Functional Name
|
* @param name Component Functional Name (cloned)
|
||||||
* @param depth Sub-component Depth
|
* @param depth Sub-component Depth
|
||||||
* @param pts_db PTS measurement database
|
* @param pts_db PTS measurement database
|
||||||
* @return created functional component instance or NULL
|
* @return created functional component instance or NULL
|
||||||
|
|||||||
Reference in New Issue
Block a user