free old pattern
This commit is contained in:
parent
55d74bd133
commit
c841de166c
1 changed files with 2 additions and 1 deletions
|
@ -71,9 +71,10 @@ node * r3_edge_branch(edge *e, int dl) {
|
|||
e->child->data = NULL;
|
||||
|
||||
// truncate the original edge pattern
|
||||
char *op = e->pattern;
|
||||
char *oldpattern = e->pattern;
|
||||
e->pattern = zstrndup(e->pattern, dl);
|
||||
e->pattern_len = dl;
|
||||
zfree(oldpattern);
|
||||
|
||||
return new_child;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue