Closed
Bug 487018
Opened 15 years ago
Closed 15 years ago
Allocator mismatches in libjar
Categories
(Core :: Networking: JAR, defect)
Core
Networking: JAR
Tracking
()
RESOLVED
FIXED
People
(Reporter: neil, Assigned: neil)
Details
Attachments
(1 file, 2 obsolete files)
10.05 KB,
patch
|
timeless
:
review+
dveditz
:
superreview+
|
Details | Diff | Splinter Review |
* In nsWildCard/nsZipFind, the pattern is created using PL_strdup but freed (in several places) using PR_Free * In nsJARManifestItem the string created by CalculatedDigest using ToNewCString is freed in several places using PR_FREEIF
Assignee | ||
Comment 1•15 years ago
|
||
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #371215 -
Flags: superreview?(dveditz)
Attachment #371215 -
Flags: review?(timeless)
Assignee | ||
Comment 2•15 years ago
|
||
Actually nsWildCard and nsZipFind are separate allocations.
Assignee | ||
Comment 3•15 years ago
|
||
Attachment #371215 -
Attachment is obsolete: true
Attachment #371217 -
Flags: superreview?(dveditz)
Attachment #371217 -
Flags: review?(timeless)
Attachment #371215 -
Flags: superreview?(dveditz)
Attachment #371215 -
Flags: review?(timeless)
Assignee | ||
Comment 4•15 years ago
|
||
Switching to nsCString reduces the amount of memory management necessary.
Attachment #371219 -
Flags: superreview?(dveditz)
Attachment #371219 -
Flags: review?(timeless)
Attachment #371219 -
Flags: review?(timeless) → review+
Comment 5•15 years ago
|
||
Comment on attachment 371219 [details] [diff] [review] Avoid manual memory management >+++ b/modules/libjar/nsZipArchive.cpp Mon Apr 06 11:57:36 2009 +0100 >@@ -740,17 +740,18 @@ nsZipArchive::FindInit(const char * aPat > if (!*aFind) { >- PR_FREEIF(pattern); >+ if (pattern) >+ PL_strfree(pattern); It should be safe to pass null to PL_strfree() >- PR_FREEIF(mPattern); >+ if (mPattern) >+ PL_strfree(mPattern); ditto. sr=dveditz
Attachment #371219 -
Flags: superreview?(dveditz) → superreview+
Comment 6•15 years ago
|
||
Comment on attachment 371217 [details] [diff] [review] Typo fix This appears to be obsoleted by attachment 371219 [details] [diff] [review].
Attachment #371217 -
Attachment is obsolete: true
Attachment #371217 -
Flags: superreview?(dveditz)
Attachment #371217 -
Flags: review?(timeless)
Assignee | ||
Comment 7•15 years ago
|
||
Pushed changeset 1fd2edfa2d49 to mozilla-central.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•