libaacs | branch: master | npzacs <[email protected]> | Thu May  3 21:35:20 2012 
+0300| [260b8add3f1a09f32098fef8b419d56b0842040c] | committer: npzacs

Fixed memory leak in lexer

> http://git.videolan.org/gitweb.cgi/libaacs.git/?a=commit;h=260b8add3f1a09f32098fef8b419d56b0842040c
---

 ChangeLog                 |    1 +
 src/file/keydbcfg-lexer.l |    7 ++++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9139949..621bcce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/src/file/keydbcfg-lexer.l b/src/file/keydbcfg-lexer.l
index 0447e0b..540ee29 100644
--- a/src/file/keydbcfg-lexer.l
+++ b/src/file/keydbcfg-lexer.l
@@ -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

_______________________________________________
libaacs-devel mailing list
[email protected]
http://mailman.videolan.org/listinfo/libaacs-devel

Reply via email to