summaryrefslogtreecommitdiff
path: root/main/stasis_cache.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-10-02 17:12:49 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-10-02 17:12:49 +0000
commit97fcd6366d128a8b9b176783743d66dbfab6e615 (patch)
treeb70dfad6f2433b9b6a7cc7ee7455ab1585c66072 /main/stasis_cache.c
parentd14869bcadf719564436b252958a0a2a3ea27fd4 (diff)
MALLOC_DEBUG: Fix some misuses of free() when MALLOC_DEBUG is enabled.
* There were several places in ARI where an external library was mallocing memory that must always be released with free(). When MALLOC_DEBUG is enabled, free() is redirected to the MALLOC_DEBUG version. Since the external library call still uses the normal malloc(), MALLOC_DEBUG complains that the freed memory block is not registered and will not free it. These cases must use ast_std_free(). * Changed calls to asprintf() and vasprintf() to the equivalent ast_asprintf() and ast_vasprintf() versions respectively. ........ Merged revisions 400270 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/stasis_cache.c')
-rw-r--r--main/stasis_cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/stasis_cache.c b/main/stasis_cache.c
index 279210d5b..86d4f4d21 100644
--- a/main/stasis_cache.c
+++ b/main/stasis_cache.c
@@ -448,10 +448,10 @@ struct stasis_caching_topic *stasis_caching_topic_create(struct stasis_topic *or
{
RAII_VAR(struct stasis_caching_topic *, caching_topic, NULL, ao2_cleanup);
struct stasis_subscription *sub;
- RAII_VAR(char *, new_name, NULL, free);
+ RAII_VAR(char *, new_name, NULL, ast_free);
int ret;
- ret = asprintf(&new_name, "%s-cached", stasis_topic_name(original_topic));
+ ret = ast_asprintf(&new_name, "%s-cached", stasis_topic_name(original_topic));
if (ret < 0) {
return NULL;
}