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. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
edge.c | ||
gvc.c | ||
json.c | ||
list.c | ||
Makefile.am | ||
match_entry.c | ||
memory.c | ||
node.c | ||
r3_debug.h | ||
slug.c | ||
slug.h | ||
str.c | ||
str.h | ||
token.c |