Closed Bug 140990 Opened 23 years ago Closed 23 years ago

Mismatched free() / delete / delete [] at nsAString::AssignFromPromise(nsAString const &) (nsAString.cpp:278)

Categories

(Core :: XPCOM, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: pj, Assigned: jag+mozilla)

References

()

Details

Attachments

(1 file, 1 obsolete file)

==19792== Mismatched free() / delete / delete [] ==19792== at 0x4054233B: nsAString::AssignFromPromise(nsAString const &) (nsAString.cpp:278) ==19792== by 0x40585E38: ??? (../../dist/include/string/nsAString.h:644) ==19792== by 0x4564DE67: nsJSEventListener::HandleEvent(nsIDOMEvent *) (nsJSEventListener.cpp:115) ==19792== by 0x4634CF7C: nsEventListenerManager::HandleEventSubType(nsListenerStruct *, nsIDOMEvent *, nsIDOMEventTarget *, unsigned int, unsigned int) (nsEventListenerManager.cpp:1219) ==19792== Address 0x43813E7C is 0 bytes inside a block of size 12 alloc'd ==19792== at 0x40040E0C: __builtin_vec_new (vg_clientfuncs.c:152) ==19792== by 0x405422A0: nsAString::AssignFromPromise(nsAString const &) (nsAString.cpp:269) ==19792== by 0x40585E38: ??? (../../dist/include/string/nsAString.h:644) ==19792== by 0x4564DE67: nsJSEventListener::HandleEvent(nsIDOMEvent *) (nsJSEventListener.cpp:115)
Attached patch Use delete[] instead. (obsolete) — Splinter Review
There's similar code elsewhere in that file. Wanna take a stab at fixing all occurrences or shall I?
Attachment #81525 - Attachment is obsolete: true
Comment on attachment 81663 [details] [diff] [review] Use delete[] everywhere. sr=jag
Attachment #81663 - Flags: superreview+
Attachment #81663 - Flags: review+
checked in
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: