Skip to content

Commit

Permalink
Fixed a memory leak in __getEntity(). Credit goes to iNoles for findi…
Browse files Browse the repository at this point in the history
…ng this one.
  • Loading branch information
AlanQuatermain committed Jun 14, 2009
1 parent b61afe9 commit 8768af9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion StreamingXMLParser/AQXMLParser.m
Expand Up @@ -531,7 +531,9 @@ static xmlEntityPtr __getEntity( void * ctx, const xmlChar * name )
NSString * nameStr = NSStringFromXmlChar(name);

NSData * data = [delegate parser: parser resolveExternalEntityName: nameStr systemID: nil];
if ( data == nil )
[nameStr release];

if ( data == nil )
return ( NULL );

if ( p->myDoc == NULL )
Expand Down

0 comments on commit 8768af9

Please sign in to comment.