projects
/
tedtools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
029b7a5
)
Fix memory leak in SFSIterate
author
teodor
<teodor>
Thu, 2 Oct 2008 14:20:21 +0000
(14:20 +0000)
committer
teodor
<teodor>
Thu, 2 Oct 2008 14:20:21 +0000
(14:20 +0000)
sfxstr.c
patch
|
blob
|
history
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;
}
- if ( s == NULL
|| s->node == NULL
)
+ if ( s == NULL )
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;