X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom%2Fgedcom_lex_common.c;h=045cea22d3ba46e2bb3c64500efafe5c784263d1;hb=5b86b2a5b5572129984e8d9f056771b7c5afca98;hp=3785da2a8960d7bec5cd88a92e3bcf87f93450f3;hpb=5fe34c1f751845fb0912834069c8e357a4cc0d6d;p=gedcom-parse.git diff --git a/gedcom/gedcom_lex_common.c b/gedcom/gedcom_lex_common.c index 3785da2..045cea2 100644 --- 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); } +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) \