Add a missing ref and fuzzer test case

pull/22957/head
yang-g 5 years ago
parent 584afc2d8e
commit 2fcb1ffe3b
  1. 6
      src/core/ext/filters/message_size/message_size_filter.cc
  2. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/error_refcount

@ -187,12 +187,8 @@ static void recv_message_ready(void* user_data, grpc_error* error) {
grpc_error* new_error = grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_COPIED_STRING(message_string),
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED);
error = grpc_error_add_child(GRPC_ERROR_REF(error), new_error);
GRPC_ERROR_UNREF(calld->error);
if (error == GRPC_ERROR_NONE) {
error = new_error;
} else {
error = grpc_error_add_child(error, new_error);
}
calld->error = GRPC_ERROR_REF(error);
gpr_free(message_string);
} else {

Loading…
Cancel
Save