aboutsummaryrefslogtreecommitdiffstats
path: root/main/ast_expr2.fl
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-10 20:45:05 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-10 20:45:05 +0000
commit8358b5cbc05a6debe45b4ccd9bdf14ef52a62a25 (patch)
tree532e93b3ebd132ebab91989ac8de66405f72a52f /main/ast_expr2.fl
parent8c685c6a427ef86e8074d7c2042fd97379bf52b4 (diff)
Merged revisions 97849 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r97849 | murf | 2008-01-10 13:21:27 -0700 (Thu, 10 Jan 2008) | 1 line This is a fix for 2 things: a problem Terry was having in OSX with null pointers, which was my fault, as I probably forgot to run the sed script last time I made mods. So, I moved the fix into the flex input itself. Then, I found when I used flex 2.5.33, that it was using __STDC_VERSION__, and that's not real good; so I added back in a DIFFERENT sed script to fix that little mess. Tested everything, a couple different ways. Hope I did no harm, at the least. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97850 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/ast_expr2.fl')
-rw-r--r--main/ast_expr2.fl9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/ast_expr2.fl b/main/ast_expr2.fl
index 575313b66..723eebf5a 100644
--- a/main/ast_expr2.fl
+++ b/main/ast_expr2.fl
@@ -121,6 +121,7 @@ static char *expr2_token_subst(const char *mess);
%option bison-bridge
%option bison-locations
%option noyywrap
+%option noyyfree
%x var trail
%%
@@ -236,6 +237,14 @@ static char *expr2_token_subst(const char *mess);
int ast_yyparse(void *); /* need to/should define this prototype for the call to yyparse */
int ast_yyerror(const char *, YYLTYPE *, struct parse_io *); /* likewise */
+void ast_yyfree(void *ptr, yyscan_t yyscanner)
+{
+ if (ptr) /* the normal generated yyfree func just frees its first arg;
+ this get complaints on some systems, as sometimes this
+ arg is a nil ptr! It's usually not fatal, but is irritating! */
+ free( (char *) ptr );
+}
+
int ast_expr(char *expr, char *buf, int length, struct ast_channel *chan)
{
struct parse_io io;