From 99308dfb4e356161863110225525830be8318e1e Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Wed, 12 Dec 2007 20:05:13 +0000 Subject: Conversions of free to ast_free, where applicable, and several other formatting fixes. Reported by: eliel Patch by: eliel,tilghman (Closes issue #11209) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92594 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/logger.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'main/logger.c') diff --git a/main/logger.c b/main/logger.c index eb7ceebc6..a1769f2e7 100644 --- a/main/logger.c +++ b/main/logger.c @@ -285,7 +285,7 @@ static struct logchannel *make_logchannel(const char *channel, const char *compo if (0 > chan->facility) { fprintf(stderr, "Logger Warning: bad syslog facility in logger.conf\n"); - free(chan); + ast_free(chan); return NULL; } @@ -332,7 +332,7 @@ static void init_logger_chain(int reload, int locked) if (!locked) AST_RWLIST_WRLOCK(&logchannels); while ((chan = AST_RWLIST_REMOVE_HEAD(&logchannels, list))) - free(chan); + ast_free(chan); if (!locked) AST_RWLIST_UNLOCK(&logchannels); @@ -882,7 +882,7 @@ static void *logger_thread(void *data) logger_print_verbose(msg); /* Free the data since we are done */ - free(msg); + ast_free(msg); } /* If we should stop, then stop */ @@ -1060,7 +1060,7 @@ void ast_log(int level, const char *file, int line, const char *function, const AST_LIST_UNLOCK(&logmsgs); } else { logger_print_normal(logmsg); - free(logmsg); + ast_free(logmsg); } return; @@ -1089,7 +1089,7 @@ void ast_backtrace(void) } else { ast_debug(1, "Could not allocate memory for backtrace\n"); } - free(addresses); + ast_free(addresses); } #else ast_log(LOG_WARNING, "Must run configure with '--enable-dev-mode' for stack backtraces.\n"); @@ -1150,7 +1150,7 @@ void ast_verbose(const char *fmt, ...) AST_LIST_UNLOCK(&logmsgs); } else { logger_print_verbose(logmsg); - free(logmsg); + ast_free(logmsg); } } @@ -1178,7 +1178,7 @@ int ast_unregister_verbose(void (*v)(const char *string)) AST_RWLIST_TRAVERSE_SAFE_BEGIN(&verbosers, cur, list) { if (cur->verboser == v) { AST_RWLIST_REMOVE_CURRENT(list); - free(cur); + ast_free(cur); break; } } -- cgit v1.2.3