mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fix a crashing bug after an invalid xpath expression is used
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/nsxml_using_libxml2@34839 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ef4da2c593
commit
abf25f6fa3
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-02-27 Doug Simons <doug.simons@testplant.com>
|
||||
|
||||
* Source/NSXMLNode.m: Fix a crashing bug after an invalid xpath
|
||||
expression is used.
|
||||
|
||||
2012-02-27 Doug Simons <doug.simons@testplant.com>
|
||||
|
||||
* Source/NSXMLNode.m:
|
||||
|
|
|
@ -647,8 +647,7 @@ NSArray *execute_xpath(NSXMLNode *xmlNode,
|
|||
if (xpathObj == NULL)
|
||||
{
|
||||
NSLog(@"Error: unable to evaluate xpath expression \"%s\"", xpathExpr);
|
||||
xmlXPathFreeContext(xpathCtx);
|
||||
xmlFreeDoc(doc);
|
||||
xmlXPathFreeContext(xpathCtx);
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue