Closed Bug 319709 Opened 18 years ago Closed 18 years ago

Unneeded allocations in mozMySpell::Suggest

Categories

(Core :: Spelling checker, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: mscott)

References

Details

The following code:

349       PRUnichar *dest = (PRUnichar *)malloc(sizeof(PRUnichar) * (outLength + 1));
...
357       // XXX ewwww.
358       tmpPtr[i] = ToNewUnicode(nsDependentString(dest));
359       free(dest);

doesn't make sense to me.  Why not just allocate |dest| using nsMemory and assign it to tmpPtr[i] directly?
Depends on: 307052
fixed by 307052
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.