[MLK] Leaking form HTTP headers

VERIFIED FIXED

Status

()

Core
HTML: Form Submission
P3
normal
VERIFIED FIXED
18 years ago
13 years ago

People

(Reporter: Patrick C. Beard, Assigned: Eric Pollmann)

Tracking

({memory-leak})

Trunk
memory-leak
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta3+] fix in hand, URL)

(Reporter)

Description

18 years ago
Call to ToNewCString(), result is passed to NS_NewPostDataStream(), which copies 
it, so string leaks.
(Reporter)

Comment 1

18 years ago
Reassigning to pollmann.
Assignee: rods → pollmann
Keywords: mlk
(Reporter)

Comment 2

18 years ago
Nominating for nsbeta3, as this leak will occur with every form submission.
Keywords: nsbeta3
(Assignee)

Comment 3

18 years ago
Looks like the post buffer is cleaned up only in the failure case:

915       if (NS_OK != rv) {
916         delete [] postBuffer;
917       }

The fix is trivial and small, suggest nsbeta3+.
Status: NEW → ASSIGNED

Updated

18 years ago
Whiteboard: [nsbeta3+]
Marking nsbeta3+
(Assignee)

Updated

18 years ago
Whiteboard: [nsbeta3+] → [nsbeta3+] fix in hand
(Assignee)

Comment 5

18 years ago
Fix checked in.

There is no way to verify this fix by running the program.  To verify by looking
at the code, look here:
http://lxr.mozilla.org/seamonkey/source/layout/html/forms/src/nsFormFrame.cpp#890

Before this was a char* that was only deleted in some cases.
Now it is an nsCAutoString, which is automatically deleted on destruction.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 6

18 years ago
Per Pollmann's comments:

Marking VERIFIED FIXED on:
- LinuxRH62 2000-09-08-08-M18 Commercial
- Win98     2000-09-08-08-M18 Mozilla
- MacOS86   2000-09-07-04-M18 Commercial
Status: RESOLVED → VERIFIED

Updated

13 years ago
OS: All
You need to log in before you can comment on or make changes to this bug.