Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
tcarmelveilleux and bzbarsky-apple authored May 16, 2022
1 parent b0b50df commit 1097515
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/credentials/FabricTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,10 @@ class DLL_EXPORT FabricInfo
}

/**
* Sets the P256Keypair used for this fabric, transferring ownership of the
* key to this object by making a copy via the P256Keypair::Serialize and
* P256Keypair::Deserialize methods.
* Sets the P256Keypair used for this fabric. This will make a copy of the keypair
* via the P256Keypair::Serialize and P256Keypair::Deserialize methods.
*
* The keyPair argument is safe to deallocate once this method returns.
*
* If your P256Keypair does not support serialization, use the
* `SetExternallyOwnedOperationalKeypair` method instead.
Expand Down Expand Up @@ -212,7 +213,8 @@ class DLL_EXPORT FabricInfo
if (mHasExternallyOwnedOperationalKey && mOperationalKey != nullptr)
{
chip::Platform::Delete(mOperationalKey);
mOperationalKey = nullptr;
}
mOperationalKey = nullptr;
}
ReleaseOperationalCerts();
mFabricIndex = kUndefinedFabricIndex;
Expand Down

0 comments on commit 1097515

Please sign in to comment.