Running UPDATE_API_BENCHMARKS from key-manager multiple times resulted in
crashes and tests fails. To fix this we need to check whether a persistent object
already exists, if it does we need to free it and only then create a new one.
Change-Id: I9d6de16194e034bc1d65d0e95b193cf9a2a717cb
FREE_PO(po);
return TEE_ERROR_ACCESS_CONFLICT;
}
- if (!object) {
- FREE_PO(po);
- return TEE_SUCCESS;
+
+ free_po(po);
+ rc = allocate_persistent_object(&po, storageID, objectID,
+ objectIDLen, flags);
+ if (rc) {
+ return rc;
}
}
rc = create_po(po, tr_obj, initialData, initialDataLen);