]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fixing leak in presense where the contact header doesn't include the fs_path option...
authorWilliam King <william.king@quentustech.com>
Wed, 22 Jan 2014 23:27:51 +0000 (15:27 -0800)
committerWilliam King <william.king@quentustech.com>
Wed, 22 Jan 2014 23:46:36 +0000 (15:46 -0800)
src/mod/endpoints/mod_sofia/sofia_glue.c

index 573d2dd387ecd8dfcb9c222093963a5deb85e8e9..70a1b5526fa128aa37af6af919c4fc5af5f5af36 100644 (file)
@@ -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';