Skip to content

Commit

Permalink
Fixing review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
woody-apple committed Oct 30, 2024
1 parent ac6953c commit 4789980
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/darwin/Framework/CHIP/MTRCertificates.mm
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ + (BOOL)keypair:(id<MTRKeypair>)keypair matchesCertificate:(NSData *)certificate
publicKey = [keypair copyPublicKey];
} else {
publicKey = [keypair publicKey];
if (publicKey)
if (publicKey) {
CFRetain(publicKey);
}
}

CHIP_ERROR err = MTRP256KeypairBridge::MatterPubKeyFromSecKeyRef(publicKey, &keypairPubKey);
Expand Down
3 changes: 2 additions & 1 deletion src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm
Original file line number Diff line number Diff line change
Expand Up @@ -825,8 +825,9 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable
publicKey = [params.nocSigner copyPublicKey];
} else {
publicKey = [params.nocSigner publicKey];
if (publicKey)
if (publicKey) {
CFRetain(publicKey);
}
}

CHIP_ERROR err = MTRP256KeypairBridge::MatterPubKeyFromSecKeyRef(publicKey, &pubKey);
Expand Down

0 comments on commit 4789980

Please sign in to comment.