Skip to content
Snippets Groups Projects
Commit 50cea018 authored by Makarand Dharmapurikar's avatar Makarand Dharmapurikar
Browse files

fixed asan memory leak ref issue

parent 3a4562b5
No related branches found
No related tags found
No related merge requests found
......@@ -297,7 +297,7 @@ static grpc_error *hc_mutate_op(grpc_exec_ctx *exec_ctx,
const int k_url_safe = 1;
const int k_multi_line = 0;
const char *k_query_separator = "?";
const size_t k_query_separator_len = GPR_ARRAY_SIZE(k_query_separator);
const size_t k_query_separator_len = 1; /* strlen(k_query_separator) */
grpc_slice path_slice =
GRPC_MDVALUE(op->send_initial_metadata->idx.named.path->md);
......
......@@ -214,7 +214,7 @@ static grpc_error *server_filter_incoming_metadata(grpc_exec_ctx *exec_ctx,
/* substitute path metadata with just the path (not query) */
grpc_mdelem mdelem_path_without_query = grpc_mdelem_from_slices(
exec_ctx, GRPC_MDSTR_PATH, grpc_slice_sub(path_slice, 0, offset));
exec_ctx, GRPC_MDSTR_PATH, grpc_slice_sub_no_ref(path_slice, 0, offset));
grpc_metadata_batch_substitute(exec_ctx, b, b->idx.named.path,
mdelem_path_without_query);
......
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