]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 11 Feb 2008 21:20:43 +0000 (21:20 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 11 Feb 2008 21:20:43 +0000 (21:20 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7589 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index 35608dbda95fff7fced8703e059e76c5cdce8cfa..d9342a0d8e9fccde35ea823bc0a07216b132d687 100644 (file)
@@ -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;
 }