From c19aa584ccb8e8d42c7becbf2046db956ae2b902 Mon Sep 17 00:00:00 2001 From: William King Date: Fri, 16 May 2014 17:01:03 -0700 Subject: [PATCH] CID: 1214222 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index e400e4d54c..206b77283b 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -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);