projects
/
tedtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix memory leak in SFSIterate
[tedtools.git]
/
sfxstr.c
diff --git
a/sfxstr.c
b/sfxstr.c
index
4a4e4da
..
e9bc84a
100644
(file)
--- a/
sfxstr.c
+++ b/
sfxstr.c
@@
-799,8
+799,13
@@
SFSIterate(SFSTree *info, SFSDataIO *out) {
return 1;
}
return 1;
}
- if ( s == NULL
|| s->node == NULL
)
+ if ( s == NULL )
return 0;
return 0;
+ if ( s->node == NULL ) {
+ info->stack = s->next;
+ tfree(s);
+ return SFSIterate(info, out);
+ }
while ( s->level + s->node->nchar + 1 >= info->tlen ) {
info->tlen *= 2;
while ( s->level + s->node->nchar + 1 >= info->tlen ) {
info->tlen *= 2;