Explorar el Código

Check for null pointer

Craig Tiller hace 11 años
padre
commit
8f4f6e207f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/core/surface/call.c

+ 1 - 1
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) {
 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) {
 static void finish_read(grpc_call *call, grpc_op_error error, void *tag) {