]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
imc_attestation: Fixed double free of tpm_version_info chunk
authorAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 7 Jan 2021 11:59:20 +0000 (12:59 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 8 Jan 2021 10:00:15 +0000 (11:00 +0100)
src/libimcv/pts/pts.c

index aeeae607595828db68f2a7099f01d745d4f63a44..976b355eba26e2c97232577bc72f34262c98fe39 100644 (file)
@@ -1039,7 +1039,8 @@ pts_t *pts_create(bool is_imc)
                {
                        this->proto_caps |= PTS_PROTO_CAPS_T | PTS_PROTO_CAPS_D;
                        this->tpm_version = this->tpm->get_version(this->tpm);
-                       this->tpm_version_info = this->tpm->get_version_info(this->tpm);
+                       this->tpm_version_info = chunk_clone(
+                                                                               this->tpm->get_version_info(this->tpm));
                        load_aik(this);
                }
        }