From 454a288ec6a7487bf8b12f85538f6c95b348e7cf 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 573d2dd387..70a1b5526f 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -5686,7 +5686,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';