imv-attestation: Fix memory leaks when creating functional components

This commit is contained in:
Tobias Brunner
2015-12-11 15:18:38 +01:00
parent 7f52715655
commit 36d42daf4d
3 changed files with 6 additions and 6 deletions
@@ -603,8 +603,8 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result,
if (!comp)
{
comp_name->log(comp_name, "unregistered ");
comp_name->destroy(comp_name);
}
comp_name->destroy(comp_name);
}
/* do TPM IMA measurements */
@@ -620,8 +620,8 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result,
if (!comp)
{
comp_name->log(comp_name, "unregistered ");
comp_name->destroy(comp_name);
}
comp_name->destroy(comp_name);
}
/* do TPM TRUSTED BOOT measurements */
@@ -637,8 +637,8 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result,
if (!comp)
{
comp_name->log(comp_name, "unregistered ");
comp_name->destroy(comp_name);
}
comp_name->destroy(comp_name);
}
attestation_state->set_handshake_state(attestation_state,
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
*
* @param name Component Functional Name
* @param name Component Functional Name (cloned)
* @param depth Sub-component Depth
* @param pts_db PTS measurement database
* @return created functional component instance or NULL