Closed
Bug 118639
Opened 24 years ago
Closed 24 years ago
fix leaks in nsFTPDirListingConv.cpp
Categories
(Core Graveyard :: Networking: FTP, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: pete, Assigned: pete)
Details
Attachments
(4 files, 1 obsolete file)
2.59 KB,
patch
|
Details | Diff | Splinter Review | |
2.88 KB,
patch
|
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
7.30 KB,
patch
|
dougt
:
review+
dougt
:
superreview+
|
Details | Diff | Splinter Review |
550 bytes,
patch
|
bbaetz
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
fix leaks and clean up file some.
--pete
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
Assignee | ||
Comment 1•24 years ago
|
||
![]() |
||
Comment 3•24 years ago
|
||
Comment on attachment 68423 [details] [diff] [review]
patch to fix leaks
>Index: nsFTPDirListingConv.cpp
> escName = nsEscape(aLine, url_Path);
>- aEntry->mName = escName;
>+ aEntry->mName.Adopt(escName);
> nsMemory::Free(escName);
crash!
> escName = nsEscape(ptr+1, url_Path);
>- aEntry->mName = escName;
>+ aEntry->mName.Adopt(escName);
> nsMemory::Free(escName);
crash!
etc... you're asking a string class to adopt a pointer, but then you free it?!?
if you're going to Adopt then don't Free. ie, the string class subsumes
ownership
of the string when you ask it to adopt a character pointer.
Attachment #68423 -
Flags: needs-work+
Assignee | ||
Comment 4•24 years ago
|
||
duh, I should have looked at things closer.
Sorry.
--pete
![]() |
||
Comment 5•24 years ago
|
||
Comment on attachment 68459 [details] [diff] [review]
removing calls to Free
>Index: nsFTPDirListingConv.cpp
>- thisEntry->mName = escName;
>+ thisEntry->mName.Adopt(escName);
> }
>- nsMemory::Free(escName);
how about cleaning up the indentation before checking in?
with that, sr=darin
Attachment #68459 -
Flags: superreview+
Assignee | ||
Comment 6•24 years ago
|
||
Comment 7•24 years ago
|
||
Comment on attachment 68536 [details] [diff] [review]
expanded tabs in file and cleaned up some intentation
r=dougt, sr=carried over from darin.
Attachment #68536 -
Flags: superreview+
Attachment #68536 -
Flags: review+
Assignee | ||
Comment 8•24 years ago
|
||
checked in
--pete
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
![]() |
||
Comment 9•24 years ago
|
||
Comment on attachment 68536 [details] [diff] [review]
expanded tabs in file and cleaned up some intentation
>@@ -1083,7 +1076,6 @@
> char *escapedDate = nsEscape(buffer, url_Path);
>
> aString.Append(escapedDate);
>- nsMemory::Free(escapedDate);
> aString.Append(' ');
>
Doesn't this leak? You're not .Adopt()ing that one....
Assignee | ||
Comment 10•24 years ago
|
||
Assignee | ||
Comment 11•24 years ago
|
||
Attachment #68720 -
Attachment is obsolete: true
![]() |
||
Comment 12•24 years ago
|
||
Comment on attachment 68721 [details] [diff] [review]
uh, wrong one, ignore previous patch
r=me
Attachment #68721 -
Flags: review+
Assignee | ||
Comment 13•24 years ago
|
||
Reopening to check in this fix.
--pete
Assignee | ||
Comment 14•24 years ago
|
||
Darin, l inadvertantly removed a needed nsMemory::Free.
can you sr this?
Thanks
--pete
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
![]() |
||
Comment 15•24 years ago
|
||
Comment on attachment 68721 [details] [diff] [review]
uh, wrong one, ignore previous patch
sr=darin
Attachment #68721 -
Flags: superreview+
Assignee | ||
Comment 17•24 years ago
|
||
Checked in.
--pete
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
![]() |
||
Comment 18•23 years ago
|
||
1.68pete%alphanumerica.comFeb 22 16:41 b=118639, r=bbaetz, sr=darin, a=asa
inadvertantly removed a needed nsMemory::Free when cleaning up leaks in this file.
--pete
Status: RESOLVED → VERIFIED
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•