aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/surface
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2015-10-06 13:34:37 -0700
committerGravatar yang-g <yangg@google.com>2015-10-06 13:34:37 -0700
commit89f1c7277928f6f222b4f2c6ec2dff71bacbbe68 (patch)
treedde210a9543036cf654cfc2d64aae61b6645805e /src/core/surface
parentfbfd3d42d2f4fcbc627b713f5ba7f0540bc0a8d0 (diff)
unref slice before cancel
Diffstat (limited to 'src/core/surface')
-rw-r--r--src/core/surface/call.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/surface/call.c b/src/core/surface/call.c
index d15a3bcbad..786535a579 100644
--- a/src/core/surface/call.c
+++ b/src/core/surface/call.c
@@ -927,6 +927,7 @@ static int add_slice_to_message(grpc_call *call, gpr_slice slice) {
}
/* we have to be reading a message to know what to do here */
if (!call->reading_message) {
+ gpr_slice_unref(slice);
cancel_with_status(call, GRPC_STATUS_INVALID_ARGUMENT,
"Received payload data while not reading a message");
return 0;