diff --git a/ta/pkcs11/src/object.c b/ta/pkcs11/src/object.c index bbd2b682288..c9a95e1b274 100644 --- a/ta/pkcs11/src/object.c +++ b/ta/pkcs11/src/object.c @@ -1094,6 +1094,7 @@ enum pkcs11_rc entry_set_attribute_value(struct pkcs11_client *client, if (get_bool(obj->attributes, PKCS11_CKA_TOKEN)) { rc = update_persistent_object_attributes(obj); if (rc) { + TEE_Free(obj->attributes); obj->attributes = head_old; goto out; }