[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $x value lost?
From: |
John |
Subject: |
Re: $x value lost? |
Date: |
Mon, 10 Mar 2003 15:25:42 -0500 (EST) |
> {kw_program} { free(yylval.string); yylval.string = strdup(yytext);
> return PROGRAM; }
> {kw_return} { free(yylval.string); yylval.string = strdup(yytext); return
> RETURN; }
> {kw_end} { free(yylval.string); yylval.string = strdup(yytext); return
> END; }
Get rid of those calls to free(). It's not that simple. You'll have to
track your own memory or use a garbage collector.