Skip to content

Commit

Permalink
Merge pull request grpc#3679 from yang-g/flake3
Browse files Browse the repository at this point in the history
unref slice before cancel
  • Loading branch information
vjpai committed Oct 6, 2015
2 parents 1485683 + 89f1c72 commit 0e62195
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 @@ -936,6 +936,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 0e62195

Please sign in to comment.