diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index 4ab7d3f989..fffdff3632 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -1455,7 +1455,10 @@ char *sofia_glue_get_path_from_contact(char *buf) } } - if (!path) return NULL; + if (!path) { + free(contact); + return NULL; + } if ((e = strrchr(path, ';'))) { *e = '\0';