Closed Bug 19132 Opened 25 years ago Closed 25 years ago

[dogfood] memory leak in XIM code

Categories

(Core :: Internationalization, defect, P3)

Other
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ftang, Assigned: ftang)

Details

(Keywords: inputmethod, Whiteboard: [PDT+] fix checked in 11/19)

In http://lxr.mozilla.org/seamonkey/source/widget/src/gtk/nsGtkEventHandler.cpp

607 static gint composition_draw(GdkEventKey *aEvent, nsWindow *aWin,
608                              nsIUnicodeDecoder *aDecoder,
609                              nsEventStatus *aStatus) {
...
618   for (;;) {
619     uniChar = aWin->mIMECompositionUniString;
620     uniCharSize = aWin->mIMECompositionUniStringSize - 1;
621     aDecoder->Convert((char*)aEvent->string, &srcLen, uniChar,
&uniCharSize);
622     if (srcLen == aEvent->length &&
623         uniCharSize < aWin->mIMECompositionUniStringSize - 1) {
624       break;
625     }
626     aWin->mIMECompositionUniStringSize += 32;
627     aWin->mIMECompositionUniString =
628       new PRUnichar[aWin->mIMECompositionUniStringSize];
629   }
We should add
if(aWin->mIMECompositionUniString)
   delete [] aWin->mIMECompositionUniString;

between line 625 and 628.
Hardware: PC → Other
Summary: memory leak in XIM code → [dogfood] memory leak in XIM code
Whiteboard: [PDT+]
Putting on PDT+ radar.
Target Milestone: M12
Putting on M12 since a PDT+
Assignee: tajima → erik
Whiteboard: [PDT+] → [PDT+] have fix; will check in 12/1
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Whiteboard: [PDT+] have fix; will check in 12/1 → [PDT+] fix checked in 11/19
Frank fixed this on 11/19.
Status: RESOLVED → REOPENED
Assignee: erik → ftang
Status: REOPENED → NEW
Status: NEW → RESOLVED
Closed: 25 years ago25 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.