fix leaks
[m6w6/ext-psi] / src / parser_proc.c
index 206056ad4dea8fb87ecee7f8a331a60dc431bd9a..cb998f0ce3099f8afa95ec02c5eb83c043644a00 100644 (file)
@@ -9442,7 +9442,7 @@ static int psi_parser_proc_lex(YYSTYPE *lvalp, struct psi_parser *P, struct psi_
 #if PSI_DEBUG_LEX
        PSI_DEBUG_PRINT(P, "PSI: LEX index %4zu ", *index);
 #endif
-       if (psi_plist_get(tokens, (*index)++, &token)) {
+       if (psi_plist_get(tokens, (*index)++, &token) && token) {
 #if PSI_DEBUG_LEX      
                PSI_DEBUG_DUMP(P, psi_token_dump, token);
 #endif