Freeing memory allocated for AIK after writing
[strongswan.git] / src / libpts / tcg / tcg_pts_attr_aik.c
index ffef15f..93bbfb9 100644 (file)
@@ -126,6 +126,7 @@ METHOD(pa_tnc_attr_t, build, void,
        writer->write_uint8(writer, flags);
        writer->write_data (writer, aik_blob);
        this->value = chunk_clone(writer->get_buf(writer));
        writer->write_uint8(writer, flags);
        writer->write_data (writer, aik_blob);
        this->value = chunk_clone(writer->get_buf(writer));
+       free(aik_blob.ptr);
        writer->destroy(writer);
 }
 
        writer->destroy(writer);
 }