aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/GRPCCall.m
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-10-10 18:09:42 -0700
committerGravatar Muxi Yan <mxyan@google.com>2018-10-10 18:09:42 -0700
commit161dc27b2d3882ab3f8a8bcc26733a729e034583 (patch)
tree661559a6fc4c81709dc761ce4332612e311174c9 /src/objective-c/GRPCClient/GRPCCall.m
parent50dac6721425b225e3e031251c7eb888ec61f07e (diff)
Copy string fix
Diffstat (limited to 'src/objective-c/GRPCClient/GRPCCall.m')
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m
index 7fdc8fcac2..c0413ec6c2 100644
--- a/src/objective-c/GRPCClient/GRPCCall.m
+++ b/src/objective-c/GRPCClient/GRPCCall.m
@@ -68,8 +68,8 @@ const char *kCFStreamVarName = "grpc_cfstream";
- (instancetype)initWithHost:(NSString *)host path:(NSString *)path safety:(GRPCCallSafety)safety {
if ((self = [super init])) {
- _host = host;
- _path = path;
+ _host = [host copy];
+ _path = [path copy];
_safety = safety;
}
return self;
@@ -77,7 +77,7 @@ const char *kCFStreamVarName = "grpc_cfstream";
- (id)copyWithZone:(NSZone *)zone {
GRPCRequestOptions *request =
- [[GRPCRequestOptions alloc] initWithHost:[_host copy] path:[_path copy] safety:_safety];
+ [[GRPCRequestOptions alloc] initWithHost:_host path:_path safety:_safety];
return request;
}