Closed Bug 20955 Opened 25 years ago Closed 25 years ago

purify reports FMM in NavigatorImpl::GetAppVersion and NavigatorImpl::GetAppName

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: buster, Assigned: vidur)

References

()

Details

(Whiteboard: [HAVE FIX])

looks like it needs to be free'd via Recycle

[E] FMM: Freeing mismatched memory in delete(void *) {2 occurrences}
    Address 0x057f09f0 points into a committed VirtualAlloc'd block
    Location of free attempt
        delete(void *) [msvcrt.dll]
        NavigatorImpl::GetAppVersion(nsString&) [nsGlobalWindow.cpp:3240]
                    PRUnichar *appVer = nsnull;
                    res = service->GetAppVersion(&appVer);
                    aAppVersion = appVer;
             =>     delete [] appVer;
                  }

                  return res;
        GetNavigatorProperty [nsJSNavigator.cpp:134]
        js_GetProperty [jsobj.c:1853]
        js_Interpret   [jsinterp.c:2182]
        js_Execute     [jsinterp.c:838]
        JS_EvaluateUCScriptForPrincipals [jsapi.c:2705]
        nsJSContext::EvaluateString(nsString const&,void *,nsIPrincipal *,char
const*,UINT,char const*,nsString&,int *) [nsJSEnvironment.cpp:284]
        HTMLContentSink::EvaluateScript(nsString&,int,char const*)
[nsHTMLContentSink.cpp:3600]
        HTMLContentSink::ProcessSCRIPTTag(nsIParserNode const&)
[nsHTMLContentSink.cpp:3788]
    Allocation location
        VirtualAlloc   [KERNEL32.dll]
        delete(void *) [msvcrt.dll]
        lock           [msvcrt.dll]
        malloc         [msvcrt.dll]
        malloc         [msvcrt.dll]
        PR_Malloc      [prmem.c:34]
        nsSimpleCharString::CopyFrom(char const*,UINT) [nsFileSpec.cpp:167]
        nsSimpleCharString::nsSimpleCharString(char const*) [nsFileSpec.cpp:60]
        ???            [ip=0x0012ee48]
        nsFileSpecHelpers::NativeToUnix(nsSimpleCharString&)
[nsFileSpecWin.cpp:128]
Summary: purify reports FMM in NavigatorImpl::GetAppVersion → purify reports FMM in NavigatorImpl::GetAppVersion and NavigatorImpl::GetAppName
also:
    NavigatorImpl::GetAppName(nsString&) [nsGlobalWindow.cpp:3255]
            PRUnichar *appName = nsnull;
            res = service->GetAppName(&appName);
            aAppName = appName;
     =>     delete [] appName;
          }

          return res;
In an attempt to get my bug list in order again, marking all the bugs I have
currently as ASSIGNED.
Whiteboard: [HAVE FIX]
Target Milestone: M13
They should be calls to Recycle() instead of delete[]. I have a patch in my tree
waiting for M13.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed on 12/21/1999.
verified.
You need to log in before you can comment on or make changes to this bug.