ff1ef2c148
When `r3_node_find_common_prefix()` searches for the common prefix it selects the first matched edge, which might not be the best match. This issue gives memoryleaks which can be viewed in legacy testcase `check_tree::test_insert_pathl()` by building using: `CFLAGS="-fno-omit-frame-pointer -fsanitize=leak" cmake ..` See testcase procedures: ret = r3_tree_insert_path(n, "/foo/{id}", NULL); .. ret = r3_tree_insert_path(n, "/foo/{idx}/{idy}", NULL); .. ret = r3_tree_insert_path(n, "/foo/{idx}/{idh}", NULL); <-- leaks Also added a testcase that triggers the problem including a leak for reproduction on baseline. |
||
---|---|---|
.. | ||
bench.c | ||
bench.h | ||
check_gvc.c | ||
check_host.c | ||
check_http_scheme.c | ||
check_json.c | ||
check_remote_addr.c | ||
check_routes.c | ||
check_routes2.c | ||
check_slug.c | ||
check_str_array.c | ||
check_tree.c | ||
CMakeLists.txt | ||
Makefile.am |