From: Anthony Minessale Date: Tue, 21 Mar 2006 01:34:53 +0000 (+0000) Subject: udpate X-Git-Tag: v1.0-beta1~3025 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=873c1caa5b594780a948bc8c74d85fed7d953baa;p=thirdparty%2Ffreeswitch.git udpate git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@882 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c index 0b4cf3f154..933b88e23f 100644 --- a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c +++ b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c @@ -1547,13 +1547,16 @@ static void teletone_destroy(JSContext *cx, JSObject *obj) struct teletone_obj *tto = JS_GetPrivate(cx, obj); switch_memory_pool *pool; if (tto) { - pool = tto->pool; if (tto->timer) { switch_core_timer_destroy(tto->timer); } teletone_destroy_session(&tto->ts); - switch_core_destroy_memory_pool(&pool); switch_core_codec_destroy(&tto->codec); + pool = tto->pool; + tto->pool = NULL; + if (pool) { + switch_core_destroy_memory_pool(&pool); + } } }