diff --git a/fscomm/widgets/codecwidget.cpp b/fscomm/widgets/codecwidget.cpp index 42b10febfd..2f82e1a8cc 100644 --- a/fscomm/widgets/codecwidget.cpp +++ b/fscomm/widgets/codecwidget.cpp @@ -131,6 +131,8 @@ void CodecWidget::setCodecString(QString codecList) QStringList parsed = codecList.split("{"); QString var = parsed.at(1); var = var.split("}").at(0); + // warning switch_core_get_Variable may return an unsafe pointer in some cases. + // revise to use switch_core_get_variable_dup, and then free it after you are done. var = switch_core_get_variable(var.toAscii().data()); if ( ! var.isEmpty() ) { codecList = var;