Index: src/OFXMLElement.m ================================================================== --- src/OFXMLElement.m +++ src/OFXMLElement.m @@ -838,11 +838,11 @@ size_t i, count = [attributes count]; for (i = 0; i < count; i++) if (objects[i]->ns == nil && [objects[i]->name isEqual: attributeName]) - return objects[i]; + return [[objects[i] retain] autorelease]; return nil; } - (OFXMLAttribute*)attributeForName: (OFString*)attributeName @@ -858,11 +858,11 @@ count = [attributes count]; for (i = 0; i < count; i++) if ([objects[i]->ns isEqual: attributeNS] && [objects[i]->name isEqual: attributeName]) - return objects[i]; + return [[objects[i] retain] autorelease]; return nil; } - (void)removeAttributeForName: (OFString*)attributeName