From 8f4f6e207f3ba74bc3aea4658e2c63529bf7d20f Mon Sep 17 00:00:00 2001 From: Craig Tiller <craig.tiller@gmail.com> Date: Sat, 31 Jan 2015 20:01:37 -0800 Subject: [PATCH] Check for null pointer --- src/core/surface/call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 2b5bcc2f52..11b65be871 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -896,7 +896,7 @@ void grpc_call_initial_metadata_complete(grpc_call_element *surface_element) { } static void finish_read_event(void *p, grpc_op_error error) { - grpc_byte_buffer_destroy(p); + if (p) grpc_byte_buffer_destroy(p); } static void finish_read(grpc_call *call, grpc_op_error error, void *tag) { -- GitLab