Skip to content

Commit

Permalink
Fix leak in expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 8, 2017
1 parent a80258f commit 586631b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgsexpression.cpp
Expand Up @@ -4537,6 +4537,7 @@ void QgsExpression::NodeList::append( QgsExpression::NamedNode* node )
mList.append( node->node );
mNameList.append( node->name.toLower() );
mHasNamedNodes = true;
delete node;
}

QgsExpression::NodeList* QgsExpression::NodeList::clone() const
Expand Down Expand Up @@ -5362,7 +5363,7 @@ bool QgsExpression::NodeFunction::validateParams( int fnIndex, QgsExpression::No
const ParameterList& functionParams = Functions()[fnIndex]->parameters();
if ( functionParams.isEmpty() )
{
error = QStringLiteral( "%1 does not supported named parameters" ).arg( Functions()[fnIndex]->name() );
error = QStringLiteral( "%1 does not support named parameters" ).arg( Functions()[fnIndex]->name() );
return false;
}
else
Expand Down

0 comments on commit 586631b

Please sign in to comment.