Fix leaking channel args

pull/2303/head
Craig Tiller 10 years ago
parent 8ef88f96b3
commit 6806e1e526
  1. 1
      src/core/surface/channel_create.c
  2. 1
      src/core/surface/secure_channel_create.c

@ -117,6 +117,7 @@ static void subchannel_factory_ref(grpc_subchannel_factory *scf) {
static void subchannel_factory_unref(grpc_subchannel_factory *scf) { static void subchannel_factory_unref(grpc_subchannel_factory *scf) {
subchannel_factory *f = (subchannel_factory *)scf; subchannel_factory *f = (subchannel_factory *)scf;
if (gpr_unref(&f->refs)) { if (gpr_unref(&f->refs)) {
grpc_channel_args_destroy(f->merge_args);
grpc_mdctx_unref(f->mdctx); grpc_mdctx_unref(f->mdctx);
gpr_free(f); gpr_free(f);
} }

@ -142,6 +142,7 @@ static void subchannel_factory_ref(grpc_subchannel_factory *scf) {
static void subchannel_factory_unref(grpc_subchannel_factory *scf) { static void subchannel_factory_unref(grpc_subchannel_factory *scf) {
subchannel_factory *f = (subchannel_factory *)scf; subchannel_factory *f = (subchannel_factory *)scf;
if (gpr_unref(&f->refs)) { if (gpr_unref(&f->refs)) {
grpc_channel_args_destroy(f->merge_args);
grpc_mdctx_unref(f->mdctx); grpc_mdctx_unref(f->mdctx);
gpr_free(f); gpr_free(f);
} }

Loading…
Cancel
Save