aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/surface/byte_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/surface/byte_buffer.c')
-rw-r--r--src/core/surface/byte_buffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/surface/byte_buffer.c b/src/core/surface/byte_buffer.c
index d1be41074d..09e2aa5b87 100644
--- a/src/core/surface/byte_buffer.c
+++ b/src/core/surface/byte_buffer.c
@@ -61,6 +61,7 @@ grpc_byte_buffer *grpc_byte_buffer_copy(grpc_byte_buffer *bb) {
}
void grpc_byte_buffer_destroy(grpc_byte_buffer *bb) {
+ if (!bb) return;
switch (bb->type) {
case GRPC_BB_SLICE_BUFFER:
gpr_slice_buffer_destroy(&bb->data.slice_buffer);