aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-04 22:38:13 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-04 22:38:13 +0000
commitd01bd3f7ace2fd034e63f6aa884a534450aa4ffd (patch)
tree26e451020d5f848e4df9e7056ef81d24ae8a823d /channels
parentd6199734e23aac123cda4075ad33e575341d46fe (diff)
Rename ast_string_field_free_pool to ast_string_field_free_memory,
and ast_string_field_free_all to ast_string_field_reset_all to avoid misuse (due to too similar names and an error in documentation). Fix two related memory leaks in app_meetme. No need to merge to trunk, different fix already applied there. Not applicable to 1.2 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88471 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c8
-rw-r--r--channels/chan_sip.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index a77fe72bb..d5d711465 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -2010,7 +2010,7 @@ retry:
iax2_frame_free(frame.data);
jb_destroy(pvt->jb);
/* gotta free up the stringfields */
- ast_string_field_free_pools(pvt);
+ ast_string_field_free_memory(pvt);
free(pvt);
}
}
@@ -8955,7 +8955,7 @@ static void peer_destructor(void *obj)
if (peer->dnsmgr)
ast_dnsmgr_release(peer->dnsmgr);
- ast_string_field_free_pools(peer);
+ ast_string_field_free_memory(peer);
}
/*! \brief Create peer structure based on configuration */
@@ -9198,7 +9198,7 @@ static void user_destructor(void *obj)
ast_variables_destroy(user->vars);
user->vars = NULL;
}
- ast_string_field_free_pools(user);
+ ast_string_field_free_memory(user);
}
/*! \brief Create in-memory user structure from configuration */
@@ -9239,7 +9239,7 @@ static struct iax2_user *build_user(const char *name, struct ast_variable *v, st
if (user) {
if (firstpass) {
- ast_string_field_free_pools(user);
+ ast_string_field_free_memory(user);
memset(user, 0, sizeof(struct iax2_user));
if (ast_string_field_init(user, 32)) {
user = user_unref(user);
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index cf4ddeb43..800050ddc 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2999,7 +2999,7 @@ static void sip_registry_destroy(struct sip_registry *reg)
ast_sched_del(sched, reg->expire);
if (reg->timeout > -1)
ast_sched_del(sched, reg->timeout);
- ast_string_field_free_pools(reg);
+ ast_string_field_free_memory(reg);
regobjs--;
free(reg);
@@ -3100,7 +3100,7 @@ static void __sip_destroy(struct sip_pvt *p, int lockowner)
}
ast_mutex_destroy(&p->lock);
- ast_string_field_free_pools(p);
+ ast_string_field_free_memory(p);
free(p);
}
@@ -5892,7 +5892,7 @@ static void temp_pvt_cleanup(void *data)
{
struct sip_pvt *p = data;
- ast_string_field_free_pools(p);
+ ast_string_field_free_memory(p);
free(data);
}
@@ -5942,7 +5942,7 @@ static int transmit_response_using_temp(ast_string_field callid, struct sockaddr
__transmit_response(p, msg, req, XMIT_UNRELIABLE);
/* Free the string fields, but not the pool space */
- ast_string_field_free_all(p);
+ ast_string_field_reset_all(p);
return 0;
}