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

Fix bug in service config code.

parent 0c0b89a8
No related branches found
No related tags found
No related merge requests found
......@@ -162,7 +162,6 @@ static char* parse_json_method_name(grpc_json* json) {
static bool parse_json_method_config(
grpc_exec_ctx* exec_ctx, grpc_json* json,
void* (*create_value)(const grpc_json* method_config_json),
void (*destroy_value)(grpc_exec_ctx* exec_ctx, void* value),
grpc_slice_hash_table_entry* entries, size_t* idx) {
// Construct value.
void* method_config = create_value(json);
......@@ -190,7 +189,6 @@ static bool parse_json_method_config(
}
success = true;
done:
destroy_value(exec_ctx, method_config);
gpr_strvec_destroy(&paths);
return success;
}
......@@ -219,8 +217,8 @@ grpc_slice_hash_table* grpc_service_config_create_method_config_table(
size_t idx = 0;
for (grpc_json* method = field->child; method != NULL;
method = method->next) {
if (!parse_json_method_config(exec_ctx, method, create_value,
destroy_value, entries, &idx)) {
if (!parse_json_method_config(exec_ctx, method, create_value, entries,
&idx)) {
return NULL;
}
}
......
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