From c537fc6f61cdbb7371af41083eac8440142ab988 Mon Sep 17 00:00:00 2001 From: William King Date: Wed, 22 Jan 2014 15:27:51 -0800 Subject: [PATCH] Fixing leak in presense where the contact header doesn't include the fs_path option during a presense subscription --- src/mod/endpoints/mod_sofia/sofia_glue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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';