]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
minor regression from 4ae8282e6c6df0e296113e9b4b4a1383e1af8ad7 (sofia_contact with...
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 8 Feb 2011 19:01:42 +0000 (13:01 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 8 Feb 2011 19:01:42 +0000 (13:01 -0600)
src/mod/endpoints/mod_sofia/mod_sofia.c

index c6832030b4a56b8454759a42bc50a3f76db77564..2a2ec63221169371cdd2f9b02ab8faa8e48a9588 100644 (file)
@@ -3458,7 +3458,7 @@ SWITCH_STANDARD_API(sofia_contact_function)
 {
        char *data;
        char *user = NULL;
-       char *domain = NULL;
+       char *domain = NULL, *dup_domain = NULL;
        char *concat = NULL;
        char *profile_name = NULL;
        char *p;
@@ -3501,7 +3501,8 @@ SWITCH_STANDARD_API(sofia_contact_function)
        }
 
        if (zstr(domain)) {
-               domain = switch_core_get_variable_pdup("domain", switch_core_session_get_pool(session));
+               dup_domain = switch_core_get_variable_dup("domain");
+               domain = dup_domain;
        }
 
        if (!user) goto end;
@@ -3567,6 +3568,7 @@ SWITCH_STANDARD_API(sofia_contact_function)
        switch_safe_free(mystream.data);                                        
 
        switch_safe_free(data);
+       switch_safe_free(dup_domain);
 
        return SWITCH_STATUS_SUCCESS;
 }