Skip to content

Commit 9723169

Browse files
Use copy instead of dataWithData
1 parent 17c2801 commit 9723169

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm

+2-4
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,8 @@
6464

6565
// Make copies of the certificates, just in case the API consumer
6666
// has them as MutableData.
67-
mRootCert = [NSData dataWithData:rootCert];
68-
if (icaCert != nil) {
69-
mIntermediateCert = [NSData dataWithData:icaCert];
70-
}
67+
mRootCert = [rootCert copy];
68+
mIntermediateCert = [icaCert copy];
7169

7270
return CHIP_NO_ERROR;
7371
}

0 commit comments

Comments
 (0)