aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-12-09 09:44:30 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-12-09 09:44:30 -0800
commitcdfd15cc1ae1f016269a41bc509b38e9f560b434 (patch)
treedc29b67eb04a2fba3764da373347f4f4b5d9eea0
parentd2b00144306610654c0ea4d0ef8ed163e0dfb150 (diff)
Continue updating PHP
-rw-r--r--src/php/ext/grpc/server.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/php/ext/grpc/server.c b/src/php/ext/grpc/server.c
index 2217a4f9a8..adcc982e59 100644
--- a/src/php/ext/grpc/server.c
+++ b/src/php/ext/grpc/server.c
@@ -149,8 +149,12 @@ PHP_METHOD(Server, requestCall) {
1 TSRMLS_CC);
goto cleanup;
}
- php_grpc_add_property_string(result, "method", details.method, true);
- php_grpc_add_property_string(result, "host", details.host, true);
+ char *method_text = grpc_slice_as_c_string(details.method);
+ char *host_text = grpc_slice_as_c_string(details.host);
+ php_grpc_add_property_string(result, "method", method_text, true);
+ php_grpc_add_property_string(result, "host", host_text, true);
+ gpr_free(method_text);
+ gpr_free(host_text);
#if PHP_MAJOR_VERSION < 7
add_property_zval(result, "call", grpc_php_wrap_call(call, true TSRMLS_CC));
add_property_zval(result, "absolute_deadline",