diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-10 19:03:04 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-10 19:03:04 +0000 |
commit | 3d2e5fea00474966a960bcf1ed66f5bad2801f7b (patch) | |
tree | 2c51dcec4fc21efe8017ad5ac75d0147c874c472 /main/ast_expr2f.c | |
parent | 45f02f8778073089b804b333ce960a83bda3c7d7 (diff) |
Check pointers before freeing (was getting WARNINGS under MALLOC_DEBUG)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97825 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/ast_expr2f.c')
-rw-r--r-- | main/ast_expr2f.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/ast_expr2f.c b/main/ast_expr2f.c index 57eb2dd5b..9f5e5cf4f 100644 --- a/main/ast_expr2f.c +++ b/main/ast_expr2f.c @@ -3963,7 +3963,8 @@ void *ast_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) void ast_yyfree (void * ptr , yyscan_t yyscanner) { - free( (char *) ptr ); /* see ast_yyrealloc() for (char *) cast */ + if (ptr) + free( (char *) ptr ); /* see ast_yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" |