diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/php/ext/grpc/call.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c index e883537c64..115358d600 100644 --- a/src/php/ext/grpc/call.c +++ b/src/php/ext/grpc/call.c @@ -539,7 +539,9 @@ cleanup: */ PHP_METHOD(Call, getPeer) { wrapped_grpc_call *call = Z_WRAPPED_GRPC_CALL_P(getThis()); - PHP_GRPC_RETURN_STRING(grpc_call_get_peer(call->wrapped), 1); + char *peer = grpc_call_get_peer(call->wrapped); + PHP_GRPC_RETVAL_STRING(peer, 1); + gpr_free(peer); } /** |