]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
CID: 1214222
authorWilliam King <william.king@quentustech.com>
Sat, 17 May 2014 00:01:03 +0000 (17:01 -0700)
committerWilliam King <william.king@quentustech.com>
Sat, 17 May 2014 00:01:03 +0000 (17:01 -0700)
sofia_glue_get_url_from_contact to strdup the value so before
overwriting the value signal to sofia that we have finished with the
raw header.

src/mod/endpoints/mod_sofia/sofia_reg.c

index e400e4d54c8ea22341bf7f063f28374ccae32d48..206b77283b36b89d78e21e938a7ee1387afc1bf3 100644 (file)
@@ -1354,6 +1354,7 @@ uint8_t sofia_reg_handle_register_token(nua_t *nua, sofia_profile_t *profile, nu
                if (sip->sip_path) {
                        if ((path_val = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_path))) {
                                char *path_stripped = sofia_glue_get_url_from_contact(path_val, SWITCH_TRUE);
+                               su_free(nua_handle_home(nh), path_val);
                                path_val = path_stripped;
                                path_encoded_len = (int)(strlen(path_val) * 3) + 1;
                                switch_zmalloc(path_encoded, path_encoded_len);