Merge pull request #17586 from vertextao/fix-free-active-critical-section

* Fixed issue(17563) "Freeing heap block containing an active critical section."
pull/17606/head
hcaseyal 6 years ago committed by GitHub
commit 1fd5d2df85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/core/lib/iomgr/resource_quota.cc
  2. 1
      src/core/lib/transport/metadata.cc

@ -665,6 +665,7 @@ void grpc_resource_quota_unref_internal(grpc_resource_quota* resource_quota) {
GPR_ASSERT(resource_quota->num_threads_allocated == 0); GPR_ASSERT(resource_quota->num_threads_allocated == 0);
GRPC_COMBINER_UNREF(resource_quota->combiner, "resource_quota"); GRPC_COMBINER_UNREF(resource_quota->combiner, "resource_quota");
gpr_free(resource_quota->name); gpr_free(resource_quota->name);
gpr_mu_destroy(&resource_quota->thread_count_mu);
gpr_free(resource_quota); gpr_free(resource_quota);
} }
} }

@ -187,6 +187,7 @@ static void gc_mdtab(mdtab_shard* shard) {
((destroy_user_data_func)gpr_atm_no_barrier_load( ((destroy_user_data_func)gpr_atm_no_barrier_load(
&md->destroy_user_data))(user_data); &md->destroy_user_data))(user_data);
} }
gpr_mu_destroy(&md->mu_user_data);
gpr_free(md); gpr_free(md);
*prev_next = next; *prev_next = next;
num_freed++; num_freed++;

Loading…
Cancel
Save