free the variable
This commit is contained in:
parent
57b4fde126
commit
9271f0bf08
2 changed files with 2 additions and 0 deletions
|
@ -503,6 +503,7 @@ node * r3_tree_insert_pathl_(node *tree, const char *path, int path_len, route *
|
|||
int slug_cnt = slug_count(path, path_len, &err);
|
||||
if (err) {
|
||||
printf("Can not insert path '%s'. Error: %s\n", path, err);
|
||||
free(err);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -120,6 +120,7 @@ START_TEST (test_incomplete_slug_path)
|
|||
|
||||
ret_node = r3_tree_insert_path(n, "/post/{handle:\\d{3", NULL);
|
||||
assert(!ret_node);
|
||||
|
||||
r3_tree_insert_path(n, "/post/{handle:\\d{3}", NULL);
|
||||
r3_tree_insert_path(n, "/post/{handle:\\d{3}}/{", NULL);
|
||||
r3_tree_insert_path(n, "/post/{handle:\\d{3}}/{a", NULL);
|
||||
|
|
Loading…
Reference in a new issue