Merge pull request #14160 from ZhouyihaiDing/pr_call_peer_leak

php: fix call return peer leak
pull/14157/head
Stanley Cheung 7 years ago committed by GitHub
commit c84c8d44c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      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);
}
/**

Loading…
Cancel
Save