X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom%2Fgedcom_lex_common.c;h=045cea22d3ba46e2bb3c64500efafe5c784263d1;hb=e6cd9cd58e0e23f70e75b140d16354af665d7b43;hp=3785da2a8960d7bec5cd88a92e3bcf87f93450f3;hpb=d2035760540dc564416171d40196bfc364b82e54;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) \