Fixed memory leaks
This commit is contained in:
committed by
Andreas Steffen
parent
31b1e389ea
commit
b9d6aded18
@@ -71,7 +71,7 @@ static pts_dh_group_t supported_dh_groups = 0;
|
||||
* High Entropy Random Data
|
||||
* used in calculation of shared secret for the assessment session
|
||||
*/
|
||||
static chunk_t responder_nonce;
|
||||
static char *responder_nonce = NULL;
|
||||
|
||||
/**
|
||||
* see section 3.7.1 of TCG TNC IF-IMC Specification 1.2
|
||||
@@ -81,6 +81,8 @@ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id,
|
||||
TNC_Version max_version,
|
||||
TNC_Version *actual_version)
|
||||
{
|
||||
rng_t *rng;
|
||||
|
||||
if (imc_attestation)
|
||||
{
|
||||
DBG1(DBG_IMC, "IMC \"%s\" has already been initialized", imc_name);
|
||||
|
||||
@@ -66,7 +66,7 @@ static pts_dh_group_t supported_dh_groups = 0;
|
||||
* High Entropy Random Data
|
||||
* used in calculation of shared secret for the assessment session
|
||||
*/
|
||||
static chunk_t initiator_nonce;
|
||||
static char *initiator_nonce = NULL;
|
||||
|
||||
/**
|
||||
* PTS file measurement database
|
||||
@@ -97,6 +97,7 @@ TNC_Result TNC_IMV_Initialize(TNC_IMVID imv_id,
|
||||
TNC_Version *actual_version)
|
||||
{
|
||||
char *hash_alg, *dh_group, *uri, *cadir;
|
||||
rng_t *rng;
|
||||
|
||||
if (imv_attestation)
|
||||
{
|
||||
@@ -485,7 +486,7 @@ TNC_Result TNC_IMV_Terminate(TNC_IMVID imv_id)
|
||||
}
|
||||
DESTROY_IF(pts_db);
|
||||
DESTROY_IF(pts_credmgr);
|
||||
free(initiator_nonce.ptr);
|
||||
free(initiator_nonce);
|
||||
|
||||
libpts_deinit();
|
||||
|
||||
|
||||
@@ -474,7 +474,7 @@ METHOD(pts_t, is_path_valid, bool,
|
||||
private_pts_t *this, char *path, pts_error_code_t *error_code)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
|
||||
*error_code = 0;
|
||||
|
||||
if (!stat(path, &st))
|
||||
|
||||
Reference in New Issue
Block a user