What steps will reproduce the problem?
1. GDataXMLDocument* doc = [[GDataXmlDocument alloc: initWithData:0 options:0
error:NULL];
(this will returns nil).
2. an GDataXMLDocument object will leak.
What is the expected output? What do you see instead?
-(id)initWithData:options:error: should release itself when initialization is
failed and returns nil,
but it won't release itself when NULL is passed to error: parameter.
The problem is at line 1621 in file: GDataXMLNode.m,
if (xmlDoc_ == NULL) {
if (error) {
*error = [NSError errorWithDomain:@"com.google.GDataXML"
code:-1
userInfo:nil];
// TODO(grobbins) use xmlSetGenericErrorFunc to capture error
//[self release]; // <-- this line should be placed at...
}
[self release]; // <-- here.
return nil;
}
Original issue reported on code.google.com by Valentin...@gmail.com on 26 Nov 2010 at 7:15
Original issue reported on code.google.com by
Valentin...@gmail.com
on 26 Nov 2010 at 7:15