diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c index 5ca6a7d43c2d40da55f90d4b3e701861afab6610..684b9ed34a4fbd24d1df0b2e461d66c74668953b 100644 --- a/src/php/ext/grpc/call.c +++ b/src/php/ext/grpc/call.c @@ -244,15 +244,9 @@ PHP_METHOD(Call, __construct) { wrapped_grpc_timeval *deadline = (wrapped_grpc_timeval *)zend_object_store_get_object( deadline_obj TSRMLS_CC); - if (host_override != NULL) { - call->wrapped = grpc_channel_create_call( - channel->wrapped, NULL, GRPC_PROPAGATE_DEFAULTS, completion_queue, method, - host_override, deadline->wrapped, NULL); - } else { - call->wrapped = grpc_channel_create_call( - channel->wrapped, NULL, GRPC_PROPAGATE_DEFAULTS, completion_queue, method, - NULL, deadline->wrapped, NULL); - } + call->wrapped = grpc_channel_create_call( + channel->wrapped, NULL, GRPC_PROPAGATE_DEFAULTS, completion_queue, method, + host_override, deadline->wrapped, NULL); } /** diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c index 138af0de221b546a22592589ba34d34071d3028f..7a981675de5a0a158fc466dd89f0f4cf4b98a01a 100644 --- a/src/php/ext/grpc/channel.c +++ b/src/php/ext/grpc/channel.c @@ -64,7 +64,6 @@ void free_wrapped_grpc_channel(void *object TSRMLS_DC) { if (channel->wrapped != NULL) { grpc_channel_destroy(channel->wrapped); } - efree(channel->target); efree(channel); } @@ -174,8 +173,6 @@ PHP_METHOD(Channel, __construct) { } efree(args.args); } - channel->target = ecalloc(target_length + 1, sizeof(char)); - memcpy(channel->target, target, target_length); } /** diff --git a/src/php/ext/grpc/channel.h b/src/php/ext/grpc/channel.h index c13fa4c6d7dfe8d51e84f6c712b19afdf520c04c..78a16ed0c9d5bab404de0cef56058c16a7ce8260 100755 --- a/src/php/ext/grpc/channel.h +++ b/src/php/ext/grpc/channel.h @@ -53,7 +53,6 @@ typedef struct wrapped_grpc_channel { zend_object std; grpc_channel *wrapped; - char *target; } wrapped_grpc_channel; /* Initializes the Channel class */