diff options
author | Will Estes <wlestes@users.sourceforge.net> | 2001-06-18 12:49:03 +0000 |
---|---|---|
committer | Will Estes <wlestes@users.sourceforge.net> | 2001-06-18 12:49:03 +0000 |
commit | 9aa410c0878c8f4926bd274ab97ec3bf588f79c8 (patch) | |
tree | 64562ce371e468fb920ccb5883cc4332f228984f /flex.skl | |
parent | ab8a2d2107d7b93c486abe90a401475e25e50901 (diff) |
patch memory leak as per millaway
Diffstat (limited to 'flex.skl')
-rw-r--r-- | flex.skl | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1959,6 +1959,18 @@ int yylex_destroy( yy_globals ) { if( yy_globals ) { + + /* Destroy the current (main) buffer. */ + yy_delete_buffer( YY_G(yy_current_buffer) YY_CALL_LAST_ARG ); + YY_G(yy_current_buffer) = NULL; + + /* Destroy the start condition stack. */ + if( YY_G(yy_start_stack) ) { + yy_flex_free( YY_G(yy_start_stack) ); + YY_G(yy_start_stack) = NULL; + } + + /* Destroy the main struct. */ yy_flex_free ( yy_globals YY_CALL_LAST_ARG ); } return 0; |