Skip to content
Snippets Groups Projects
Commit 0f4bbba8 authored by Mark D. Roth's avatar Mark D. Roth
Browse files

Fix allocation bugs in server shutdown.

parent a0bcfbbf
No related branches found
No related tags found
No related merge requests found
......@@ -338,11 +338,12 @@ error:
}
if (tcp_server) {
grpc_tcp_server_unref(exec_ctx, tcp_server);
} else {
grpc_channel_args_destroy(state->args);
grpc_chttp2_server_handshaker_factory_destroy(exec_ctx,
state->handshaker_factory);
gpr_free(state);
}
grpc_channel_args_destroy(state->args);
grpc_chttp2_server_handshaker_factory_destroy(exec_ctx,
state->handshaker_factory);
gpr_free(state);
*port_num = 0;
done:
......
......@@ -69,6 +69,7 @@ static void server_security_handshaker_factory_destroy(
(server_security_handshaker_factory *)hf;
GRPC_SECURITY_CONNECTOR_UNREF(&handshaker_factory->security_connector->base,
"server");
gpr_free(hf);
}
static const grpc_chttp2_server_handshaker_factory_vtable
......@@ -124,9 +125,6 @@ done:
gpr_log(GPR_ERROR, "%s", msg);
grpc_error_free_string(msg);
GRPC_ERROR_UNREF(err);
if (sc != NULL) {
GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "server");
}
}
return port_num;
}
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