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)
|
||||
{
|
||||
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
|
||||
|
||||
@@ -45,7 +45,7 @@ struct pts_component_manager_t {
|
||||
* @param comp_func_names Vendor-specific Component Functional names
|
||||
* @param qualifier_type_size Vendor-specific Qualifier Type size
|
||||
* @param qualifier_flag_names Vendor-specific Qualifier Flag names
|
||||
* @param qualifier_type_names Vendor-specific Qualifier Type names
|
||||
* @param qualifier_type_names Vendor-specific Qualifier Type names
|
||||
*/
|
||||
void (*add_vendor)(pts_component_manager_t *this, pen_t vendor_id,
|
||||
enum_name_t *comp_func_names,
|
||||
@@ -106,7 +106,7 @@ struct pts_component_manager_t {
|
||||
* @param pts_db PTS measurement database
|
||||
* @return Component object if supported, NULL else
|
||||
*/
|
||||
pts_component_t* (*create)(pts_component_manager_t *this,
|
||||
pts_component_t* (*create)(pts_component_manager_t *this,
|
||||
pts_comp_func_name_t *name, u_int32_t depth,
|
||||
pts_database_t *pts_db);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user