dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
gedcom-parse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Call init function for the lexer.
[gedcom-parse.git]
/
gedcom
/
gedcom_lex_common.c
diff --git
a/gedcom/gedcom_lex_common.c
b/gedcom/gedcom_lex_common.c
index 3785da2a8960d7bec5cd88a92e3bcf87f93450f3..045cea22d3ba46e2bb3c64500efafe5c784263d1 100644
(file)
--- a/
gedcom/gedcom_lex_common.c
+++ b/
gedcom/gedcom_lex_common.c
@@
-136,6
+136,13
@@
static void error_unexpected_character(const char* str, char ch)
gedcom_error(_("Unexpected character: '%s' (0x%02x)"), str, ch);
}
gedcom_error(_("Unexpected character: '%s' (0x%02x)"), str, ch);
}
+static void yylex_cleanup()
+{
+ /* fix memory leak in lex */
+ yy_delete_buffer(yy_current_buffer);
+ yy_current_buffer = NULL;
+}
+
#else /* of #ifndef IN_LEX */
#define TO_INTERNAL(STR,OUTBUF) \
#else /* of #ifndef IN_LEX */
#define TO_INTERNAL(STR,OUTBUF) \