plug memory leak flushed out by auto-juggle code: null dict doesn't

mean the end of the list.
This commit is contained in:
Andy2 2011-06-29 18:28:55 -07:00 committed by Eric House
parent 48ea9e2b28
commit 0c42da905a

View file

@ -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;
}
}