fix small problems in thread package.

This commit is contained in:
Vítor Santos Costa
2011-12-01 11:05:27 +00:00
parent 4db885e3c3
commit 84b017e5fd
2 changed files with 29 additions and 12 deletions

View File

@@ -1392,9 +1392,10 @@ Yap_clean_tokenizer(TokEntry *tokstart, VarEntry *vartable, VarEntry *anonvartab
}
LOCAL_Comments = TermNil;
LOCAL_CommentsNextChar = LOCAL_CommentsTail = NULL;
free(LOCAL_CommentsBuff);
if (LOCAL_CommentsBuff)
if (LOCAL_CommentsBuff) {
free(LOCAL_CommentsBuff);
LOCAL_CommentsBuff = NULL;
}
LOCAL_CommentsBuffLim = 0;
}