Closed
Bug 244133
Opened 20 years ago
Closed 20 years ago
nsStandardUrl mixes calls between NSPR malloc and clib free
Categories
(Core :: Networking, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 243079
People
(Reporter: bmo, Assigned: darin.moz)
Details
Attachments
(1 file)
3.11 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040514 Build Identifier: nightly 1.8, FTP source: mozilla-source.tar.bz2 2004/05/19 16:16:00 nsStandardUrl allocates some memory with nsCRT::strdup and then frees it by calling free() directly. This causes (non-fatal) exceptions to be thrown on Windows. The problem is that NSPR mallocs are done in a DLL and need to be free'd from that same DLL. Thus malloc/free or PR_Malloc/PR_Free but not a mix. Reproducible: Always Steps to Reproduce: Expected Results: See attached patch.
The change to PR_Malloc/PR_Free in EncodeString() isn't strictly necessary as the allocated memory never makes it out of the function. However in the name of consistency I changed it over too.
Comment 2•20 years ago
|
||
this is already known as bug 243079... although that bug is really unfindable. I resummarized it to make it a bit easier to find. fwiw I prefer this patch to the suggestions in that bug... *** This bug has been marked as a duplicate of 243079 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•