Skip to content
Snippets Groups Projects
Commit 89f1c727 authored by yang-g's avatar yang-g
Browse files

unref slice before cancel

parent fbfd3d42
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment