On 16.01.2014 16:56, pulkomandy@xxxxxxxxxxxxx wrote:
@@ -370,7 +389,7 @@ BNetworkCookieJar::operator=(const BNetworkCookieJar& other) fFlattened = other.fFlattened; delete fCookieHashMap; - fCookieHashMap = new PrivateHashMap(); + fCookieHashMap = new(std::nothrow) PrivateHashMap(); for (Iterator it = other.GetIterator(); it.HasNext();) { BNetworkCookie* cookie = it.Next();
Here you don't check the fCookieHashMap allocation. You should probably do the allocation in the beginning of the function and include failure in the B_NO_MEMORY return which is already there.
Best regards, -Stephan