Index: apps/app_mixmonitor.c =================================================================== --- apps/app_mixmonitor.c (revision 89168) +++ apps/app_mixmonitor.c (working copy) @@ -260,7 +260,7 @@ /* Setup the actual spy before creating our thread */ if (ast_audiohook_init(&mixmonitor->audiohook, AST_AUDIOHOOK_TYPE_SPY, mixmonitor_spy_type)) { - free(mixmonitor); + ast_free(mixmonitor); return; } Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 89168) +++ apps/app_voicemail.c (working copy) @@ -7337,9 +7337,9 @@ if (vmu) free_user(vmu); if (vms.deleted) - free(vms.deleted); + ast_free(vms.deleted); if (vms.heard) - free(vms.heard); + ast_free(vms.heard); return res; } @@ -7784,7 +7784,7 @@ static void mwi_sub_destroy(struct mwi_sub *mwi_sub) { - free(mwi_sub); + ast_free(mwi_sub); } static void mwi_unsub_event_cb(const struct ast_event *event, void *userdata) Index: apps/app_dial.c =================================================================== --- apps/app_dial.c (revision 89168) +++ apps/app_dial.c (working copy) @@ -394,7 +394,7 @@ #define S_REPLACE(s, new_val) \ do { \ if (s) \ - free(s); \ + ast_free(s); \ s = (new_val); \ } while (0) @@ -1658,7 +1658,7 @@ if (gosub_args) { res = pbx_exec(peer, theapp, gosub_args); ast_pbx_run(peer); - free(gosub_args); + ast_free(gosub_args); if (option_debug) ast_log(LOG_DEBUG, "Gosub exited with status %d\n", res); } else Index: apps/app_queue.c =================================================================== --- apps/app_queue.c (revision 89168) +++ apps/app_queue.c (working copy) @@ -715,15 +715,15 @@ handle_statechange(sc); - free(sc); + ast_free(sc); sc = NULL; } if (sc) - free(sc); + ast_free(sc); while ((sc = AST_LIST_REMOVE_HEAD(&device_state.state_change_q, entry))) - free(sc); + ast_free(sc); return NULL; } @@ -2788,7 +2788,7 @@ break; } else { ao2_ref(cur, -1); - free(tmp); + ast_free(tmp); } } if (qe->expire && (!qe->parent->timeout || (qe->expire - now) <= qe->parent->timeout)) @@ -3125,7 +3125,7 @@ if (gosub_args) { res = pbx_exec(qe->chan, app, gosub_args); ast_pbx_run(qe->chan); - free(gosub_args); + ast_free(gosub_args); if (option_debug) ast_log(LOG_DEBUG, "Gosub exited with status %d\n", res); } else Index: main/utils.c =================================================================== --- main/utils.c (revision 89168) +++ main/utils.c (working copy) @@ -796,7 +796,7 @@ ast_cli(a->fd, "%s", str->str); - free(str); + ast_free(str); return CLI_SUCCESS; } Index: main/channel.c =================================================================== --- main/channel.c (revision 89168) +++ main/channel.c (working copy) @@ -1147,7 +1147,7 @@ #ifdef HAVE_EPOLL for (i = 0; i < AST_MAX_FDS; i++) { if (chan->epfd_data[i]) - free(chan->epfd_data[i]); + ast_free(chan->epfd_data[i]); } close(chan->epfd); #endif @@ -1317,7 +1317,7 @@ epoll_ctl(chan->epfd, EPOLL_CTL_ADD, fd, &ev); } else if (aed) { /* We don't have to keep around this epoll data structure now */ - free(aed); + ast_free(aed); chan->epfd_data[which] = NULL; } #endif Index: main/logger.c =================================================================== --- main/logger.c (revision 89168) +++ main/logger.c (working copy) @@ -283,7 +283,7 @@ if (0 > chan->facility) { fprintf(stderr, "Logger Warning: bad syslog facility in logger.conf\n"); - free(chan); + ast_free(chan); return NULL; } @@ -330,7 +330,7 @@ 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); @@ -871,7 +871,7 @@ logger_print_verbose(msg); /* Free the data since we are done */ - free(msg); + ast_free(msg); } /* If we should stop, then stop */ @@ -1049,7 +1049,7 @@ AST_LIST_UNLOCK(&logmsgs); } else { logger_print_normal(logmsg); - free(logmsg); + ast_free(logmsg); } return; @@ -1074,11 +1074,11 @@ ast_log(LOG_DEBUG, "#%d: [%016lX] %s\n", i, (unsigned long)addresses[i], strings[i]); #endif } - free(strings); + ast_free(strings); } 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"); @@ -1139,7 +1139,7 @@ AST_LIST_UNLOCK(&logmsgs); } else { logger_print_verbose(logmsg); - free(logmsg); + ast_free(logmsg); } } @@ -1167,7 +1167,7 @@ AST_RWLIST_TRAVERSE_SAFE_BEGIN(&verbosers, cur, list) { if (cur->verboser == v) { AST_RWLIST_REMOVE_CURRENT(list); - free(cur); + ast_free(cur); break; } }