Fixes for memory leaks
authorSansar Choinyambuu <schoinya@hsr.ch>
Fri, 7 Oct 2011 13:15:01 +0000 (15:15 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 28 Nov 2011 13:34:21 +0000 (14:34 +0100)
src/libpts/tcg/tcg_pts_attr_dh_nonce_params_resp.c
src/libpts/tcg/tcg_pts_attr_simple_comp_evid.c

index cbbea4f..0b3b9da 100644 (file)
@@ -250,7 +250,7 @@ pa_tnc_attr_t *tcg_pts_attr_dh_nonce_params_resp_create(u_int8_t nonce_len,
                .dh_group = dh_group,
                .hash_algo_set = hash_algo_set,
                .responder_nonce = chunk_clone(responder_nonce),
-               .responder_pub_val = chunk_clone(responder_pub_val),
+               .responder_pub_val = responder_pub_val,
        );
 
        return &this->public.pa_tnc_attribute;
index 493a227..49ae01c 100644 (file)
@@ -566,8 +566,8 @@ pa_tnc_attr_t *tcg_pts_attr_simple_comp_evid_create(
                .transformation = params.transformation,
                .measurement_time = chunk_clone(params.measurement_time),
                .policy_uri = chunk_clone(params.policy_uri),
-               .pcr_before = chunk_clone(params.pcr_before),
-               .pcr_after = chunk_clone(params.pcr_after),
+               .pcr_before = params.pcr_before,
+               .pcr_after = params.pcr_after,
                .measurement = chunk_clone(params.measurement),
        );