]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Reset the whole transcoding session memory on destroy
authorMoises Silva <msilva@sangoma.com>
Mon, 21 Mar 2016 00:12:50 +0000 (20:12 -0400)
committerMoises Silva <msilva@sangoma.com>
Mon, 21 Mar 2016 00:12:50 +0000 (20:12 -0400)
Again, this shouldn't fix anything, but should make debugging easier.

FS-8312

src/mod/codecs/mod_sangoma_codec/mod_sangoma_codec.c

index a4da4430b68c6599f7d1ee0ef3927b0746a601d1..6ce31b14025da3681aca63c318fbce1d98a2d809 100644 (file)
@@ -864,14 +864,13 @@ static switch_status_t switch_sangoma_destroy(switch_codec_t *codec)
 
        if (sess->encoder.txrtp) {
                sngtc_free_transcoding_session(&sess->encoder.reply);
-               memset(&sess->encoder, 0, sizeof(sess->encoder));
        }
        if (sess->decoder.txrtp) {
                sngtc_free_transcoding_session(&sess->decoder.reply);
-               memset(&sess->decoder, 0, sizeof(sess->decoder));
        }
        
        switch_core_hash_delete(g_sessions_hash, sess->hashkey);
+       memset(sess, 0, sizeof(*sess));
 
        switch_mutex_unlock(g_sessions_lock);
        return SWITCH_STATUS_SUCCESS;