mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-09 21:14:02 +00:00
fix possible bad pointer in global vars (please test)
This commit is contained in:
1 parent
85913b70b4
commit
f60fdf653d
1 file changed
+2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user