@@ -440,16 +440,11 @@ @try { void *pool = objc_autoreleasePoolPush(); char *tmp, *tmp2; bool isIPv6Host = false; - if ((UTF8String2 = OFStrdup(string.UTF8String)) == NULL) - @throw [OFOutOfMemoryException - exceptionWithRequestedSize: - string.UTF8StringLength]; - - UTF8String = UTF8String2; + UTF8String = UTF8String2 = OFStrDup(string.UTF8String); if ((tmp = strchr(UTF8String, ':')) == NULL) @throw [OFInvalidFormatException exception]; if (strncmp(tmp, "://", 3) != 0) @@ -631,16 +626,11 @@ _URLEncodedHost = [URL->_URLEncodedHost copy]; _port = [URL->_port copy]; _URLEncodedUser = [URL->_URLEncodedUser copy]; _URLEncodedPassword = [URL->_URLEncodedPassword copy]; - if ((UTF8String2 = OFStrdup(string.UTF8String)) == NULL) - @throw [OFOutOfMemoryException - exceptionWithRequestedSize: - string.UTF8StringLength]; - - UTF8String = UTF8String2; + UTF8String = UTF8String2 = OFStrDup(string.UTF8String); if ((tmp = strchr(UTF8String, '#')) != NULL) { *tmp = '\0'; _URLEncodedFragment = [[OFString alloc] initWithUTF8String: tmp + 1];