]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Fixed some memory leaks
authorSansar Choinyambuu <schoinya@hsr.ch>
Wed, 5 Oct 2011 08:53:05 +0000 (10:53 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 28 Nov 2011 13:34:21 +0000 (14:34 +0100)
src/libimcv/plugins/imc_attestation/imc_attestation.c
src/libimcv/plugins/imv_attestation/imv_attestation.c
src/libpts/tcg/tcg_pts_attr_dh_nonce_finish.c

index 993ea25681e0c733ac44ae7579c9246b9ddda8ca..c7d1b733653d8700736e284e992e9790b738b7cd 100644 (file)
@@ -373,7 +373,7 @@ TNC_Result TNC_IMC_ReceiveMessage(TNC_IMCID imc_id,
                                        {
                                                return TNC_RESULT_FATAL;
                                        }
-                                       responder_pub_val = pts->get_my_pub_val(pts);
+                                       pts->get_my_pub_val(pts, &responder_pub_val);
 
                                        attr = tcg_pts_attr_dh_nonce_params_resp_create(NONCE_LEN,
                                                                selected_dh_group, supported_algorithms,
index 46f3d9bc3443d79f2dfb06999b3087d3d60215f3..c8aa8202d4def05fa80071ba74fd546f9eab7f1c 100644 (file)
@@ -315,7 +315,8 @@ static TNC_Result send_message(TNC_ConnectionID connection_id)
 
                                /* Send DH nonce finish attribute */
                                selected_algorithm = pts->get_meas_algorithm(pts);
-                               initiator_pub_val = pts->get_my_pub_val(pts);
+                               pts->get_my_pub_val(pts, &initiator_pub_val);
+
                                attr = tcg_pts_attr_dh_nonce_finish_create(NONCE_LEN,
                                                                        selected_algorithm,
                                                                        chunk_create(initiator_nonce, NONCE_LEN),
index 1b147516e11f3ae51fa9a5e1ccdcdf86eca5b387..25fca24f0af6a4c8ea883be81e6da6288454106a 100644 (file)
@@ -232,7 +232,7 @@ pa_tnc_attr_t *tcg_pts_attr_dh_nonce_finish_create(u_int8_t nonce_len,
                .nonce_len = nonce_len,
                .hash_algo = hash_algo,
                .initiator_nonce = chunk_clone(initiator_nonce),
-               .initiator_pub_val = chunk_clone(initiator_pub_val),
+               .initiator_pub_val = initiator_pub_val,
        );
 
        return &this->public.pa_tnc_attribute;