diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index 8a89a5a3b6..c0abd47a44 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -4162,13 +4162,8 @@ sofia_destination_t* sofia_glue_get_destination(char *data) *p = '\0'; } while ((--p > route_uri) && *p == ' '); } - } - else { - if(!(route_uri = strdup(contact))) { - goto mem_fail; - } - } - + } + if (!(to = strdup(data))) { goto mem_fail; }