projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix leak
[m6w6/ext-psi]
/
src
/
cpp.c
diff --git
a/src/cpp.c
b/src/cpp.c
index e79a563185d8c0139c855c9a800a529067a4ca3b..2cf4094e93efbd5ef9303c67e23ce75c97fefecc 100644
(file)
--- a/
src/cpp.c
+++ b/
src/cpp.c
@@
-281,17
+281,20
@@
static bool psi_cpp_stage2(struct psi_cpp *cpp)
if (is_eol) {
size_t processed = 0;
if (is_eol) {
size_t processed = 0;
+ bool parsed = psi_parser_process(cpp->parser, parser_tokens, &processed);
- if (!psi_parser_process(cpp->parser, parser_tokens, &processed)) {
- psi_plist_free(parser_tokens);
- return false;
- }
+ /* EOL */
psi_plist_pop(parser_tokens, NULL);
psi_plist_clean(parser_tokens);
do_cpp = false;
psi_plist_pop(parser_tokens, NULL);
psi_plist_clean(parser_tokens);
do_cpp = false;
+
+ if (!parsed) {
+ psi_plist_free(parser_tokens);
+ return false;
+ }
} else {
/* leave EOLs in the input stream, else we might end up
} else {
/* leave EOLs in the input stream, else we might end up
- * with a hash not prece
e
ded with a new line after include */
+ * with a hash not preceded with a new line after include */
psi_cpp_tokiter_del_cur(cpp, false);
}
psi_cpp_tokiter_del_cur(cpp, false);
}