From 52760a9ea1799e8fd26bb457741c93a7a6bfc98b Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 11 Feb 2008 21:20:43 +0000 Subject: [PATCH] tweak git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7589 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 35608dbda9..d9342a0d8e 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -1382,6 +1382,8 @@ SWITCH_STANDARD_API(sofia_contact_function) char *domain = NULL; char *profile_name = NULL; char *p; + sofia_profile_t *profile = NULL; + if (!cmd) { stream->write_function(stream, "%s", ""); @@ -1409,7 +1411,6 @@ SWITCH_STANDARD_API(sofia_contact_function) if (user && profile_name) { char *sql; - sofia_profile_t *profile; if (!(profile = sofia_glue_find_profile(profile_name))) { profile_name = domain; @@ -1449,6 +1450,11 @@ SWITCH_STANDARD_API(sofia_contact_function) end: switch_safe_free(data); + + if (profile) { + sofia_glue_release_profile(profile); + } + return SWITCH_STATUS_SUCCESS; }