Skip to content

Commit

Permalink
unref slice before cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
yang-g committed Oct 6, 2015
1 parent fbfd3d4 commit 89f1c72
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/surface/call.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 89f1c72

Please sign in to comment.