mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
plug memory leak flushed out by auto-juggle code: null dict doesn't
mean the end of the list.
This commit is contained in:
parent
48ea9e2b28
commit
0c42da905a
1 changed files with 8 additions and 6 deletions
|
@ -477,12 +477,14 @@ makeDict( MPFORMAL JNIEnv *env, JNIUtilCtxt* jniutil, jbyteArray jbytes,
|
|||
void
|
||||
destroyDicts( PlayerDicts* dicts )
|
||||
{
|
||||
DictionaryCtxt** ctxts = dicts->dicts;
|
||||
for ( ; ; ) {
|
||||
if ( !*ctxts ) {
|
||||
break;
|
||||
int ii;
|
||||
DictionaryCtxt** ctxts;
|
||||
|
||||
for ( ctxts = dicts->dicts, ii = 0;
|
||||
ii < VSIZE(dicts->dicts);
|
||||
++ii, ++ctxts ) {
|
||||
if ( NULL != *ctxts ) {
|
||||
dict_destroy( *ctxts );
|
||||
}
|
||||
dict_destroy( *ctxts );
|
||||
++ctxts;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue