From: Michael Jerris Date: Mon, 18 Feb 2008 22:46:19 +0000 (+0000) Subject: don't seg when loading codecs X-Git-Tag: v1.0-rc1~254 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21bab63590a98fe05b5dbd8d0e37b86e73cc92d4;p=thirdparty%2Ffreeswitch.git don't seg when loading codecs git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7686 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/include/switch_loadable_module.h b/src/include/switch_loadable_module.h index 43b4cbc9be..19514d7fb3 100644 --- a/src/include/switch_loadable_module.h +++ b/src/include/switch_loadable_module.h @@ -309,7 +309,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void); #define SWITCH_ADD_CODEC(codec_int, int_name) \ for (;;) { \ codec_int = (switch_codec_interface_t *)switch_loadable_module_create_interface(*module_interface, SWITCH_CODEC_INTERFACE); \ - codec_int->interface_name = int_name; \ + codec_int->interface_name = switch_core_strdup(pool, int_name); \ break; \ } @@ -358,7 +358,7 @@ static inline void switch_core_codec_add_implementation(switch_memory_pool_t *po impl->codec_type = codec_type; impl->ianacode = ianacode; impl->iananame = switch_core_strdup(pool, iananame); - impl->fmtp = fmtp; + impl->fmtp = switch_core_strdup(pool, fmtp); impl->samples_per_second = samples_per_second; impl->actual_samples_per_second = actual_samples_per_second; impl->bits_per_second = bits_per_second;