]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11038: [mod_sofia] fix crash in gwlist api command
authorMike Jerris <mike@jerris.com>
Thu, 15 Mar 2018 21:28:16 +0000 (17:28 -0400)
committerMuteesa Fred <muteesafred@hotmail.com>
Tue, 24 Jul 2018 07:21:40 +0000 (07:21 +0000)
src/mod/endpoints/mod_sofia/sofia_glue.c

index 3db4ba6012452d6929863bbb797fb4f347bfa357..c01b27d1f4f4c6e5792c60845cb80742f3d8a69e 100644 (file)
@@ -1693,7 +1693,6 @@ void sofia_glue_del_every_gateway(sofia_profile_t *profile)
 void sofia_glue_gateway_list(sofia_profile_t *profile, switch_stream_handle_t *stream, int up)
 {
        sofia_gateway_t *gp = NULL;
-       char *r = (char *) stream->data;
 
        switch_mutex_lock(mod_sofia_globals.hash_mutex);
        for (gp = profile->gateways; gp; gp = gp->next) {
@@ -1704,10 +1703,6 @@ void sofia_glue_gateway_list(sofia_profile_t *profile, switch_stream_handle_t *s
                }
        }
 
-       if (r) {
-               end_of(r) = '\0';
-       }
-
        switch_mutex_unlock(mod_sofia_globals.hash_mutex);
 }