зеркало из https://github.com/mozilla/gecko-dev.git
Fix some leaks (bug #72179). Not part of default build. r=Pike.
This commit is contained in:
Родитель
ca7ab7c43c
Коммит
c1d6e94e4c
|
@ -21,7 +21,7 @@
|
|||
* Keith Visco, kvisco@ziplink.net
|
||||
* -- original author.
|
||||
*
|
||||
* $Id: txPredicateList.cpp,v 1.1 2005/11/02 07:33:50 kvisco%ziplink.net Exp $
|
||||
* $Id: txPredicateList.cpp,v 1.2 2005/11/02 07:33:51 peterv%netscape.com Exp $
|
||||
*/
|
||||
|
||||
#include "Expr.h"
|
||||
|
@ -30,7 +30,7 @@
|
|||
* Represents an ordered list of Predicates,
|
||||
* for use with Step and Filter Expressions
|
||||
* @author <A HREF="mailto:kvisco@ziplink.net">Keith Visco</A>
|
||||
* @version $Revision: 1.1 $ $Date: 2005/11/02 07:33:50 $
|
||||
* @version $Revision: 1.2 $ $Date: 2005/11/02 07:33:51 $
|
||||
**/
|
||||
//-- PredicateList Implementation --/
|
||||
|
||||
|
@ -100,6 +100,7 @@ void PredicateList::evaluatePredicates(NodeSet* nodes, ContextState* cs) {
|
|||
if (! exprResult->booleanValue() ) remNodes.add(node);
|
||||
break;
|
||||
}
|
||||
delete exprResult;
|
||||
}
|
||||
}
|
||||
//-- remove unmatched nodes
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* Keith Visco, kvisco@ziplink.net
|
||||
* -- original author.
|
||||
*
|
||||
* $Id: txRelationalExpr.cpp,v 1.4 2005/11/02 07:33:47 Peter.VanderBeken%pandora.be Exp $
|
||||
* $Id: txRelationalExpr.cpp,v 1.5 2005/11/02 07:33:48 peterv%netscape.com Exp $
|
||||
*/
|
||||
|
||||
#include "Expr.h"
|
||||
|
@ -165,7 +165,10 @@ ExprResult* RelationalExpr::evaluate(Node* context, ContextState* cs) {
|
|||
delete lResult;
|
||||
return new BooleanResult();
|
||||
}
|
||||
return new BooleanResult(compareResults(lResult, rResult));
|
||||
BooleanResult* boolResult = new BooleanResult(compareResults(lResult, rResult));
|
||||
delete lResult;
|
||||
delete rResult;
|
||||
return boolResult;
|
||||
} //-- evaluate
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,14 +21,14 @@
|
|||
* Keith Visco, kvisco@ziplink.net
|
||||
* -- original author.
|
||||
*
|
||||
* $Id: txStringFunctionCall.cpp,v 1.7 2005/11/02 07:33:42 axel%pike.org Exp $
|
||||
* $Id: txStringFunctionCall.cpp,v 1.8 2005/11/02 07:33:43 peterv%netscape.com Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
* StringFunctionCall
|
||||
* A representation of the XPath String funtions
|
||||
* @author <A HREF="mailto:kvisco@ziplink.net">Keith Visco</A>
|
||||
* @version $Revision: 1.7 $ $Date: 2005/11/02 07:33:42 $
|
||||
* @version $Revision: 1.8 $ $Date: 2005/11/02 07:33:43 $
|
||||
**/
|
||||
|
||||
#include "FunctionLib.h"
|
||||
|
@ -260,9 +260,10 @@ ExprResult* StringFunctionCall::evaluate(Node* context, ContextState* cs) {
|
|||
else src.append(chars[i]);
|
||||
}
|
||||
delete chars;
|
||||
return new StringResult(src);
|
||||
result = new StringResult(src);
|
||||
}
|
||||
result = new StringResult("");
|
||||
else
|
||||
result = new StringResult("");
|
||||
break;
|
||||
|
||||
default : //-- string( object? )
|
||||
|
|
Загрузка…
Ссылка в новой задаче