Commit 260b8add authored by npzacs's avatar npzacs

Fixed memory leak in lexer

parent 9e39d143
......@@ -2,6 +2,7 @@
- Added aacs_open2() and error codes
- Renamed libaacs_test to aacs_info
- Added aacs_get_mkb_version()
- Fixed memory leaks
2012-03-21: Version 0.3.1
- Added configure option for libgcrypt prefix
......
......@@ -31,7 +31,9 @@
int isatty(int i) { return 0; }
#if 0
static char *trim_string(const char *string);
#endif
%}
/* Options to generate reentrant lexer that's POSIX lex compatible. The
* bison-bridge option is also set since bison forces the use of a parameter
......@@ -86,7 +88,8 @@ BAD_ENTRY ([^\n])
{WHITESPACE} {}
<TITLE_STATE>{DISC_TITLE} {
yylval->string = trim_string(yytext);
//yylval->string = trim_string(yytext);
yylval->string = yytext;
BEGIN INITIAL;
return DISC_TITLE;
}
......@@ -135,6 +138,7 @@ BAD_ENTRY ([^\n])
{COMMENT} {}
{BAD_ENTRY} { return BAD_ENTRY; }
%%
#if 0
/* Function used to trim leading and trailing space from a string */
static char *trim_string(const char *string)
{
......@@ -151,3 +155,4 @@ static char *trim_string(const char *string)
new_string[size] = '\0';
return new_string;
}
#endif
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment