Closed
Bug 103085
Opened 23 years ago
Closed 23 years ago
Memory leak of 132 bytes from 1 block allocated in nsLDAPConnectionLoop::Init
Categories
(MailNews Core :: LDAP Integration, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0
People
(Reporter: stephend, Assigned: leif)
Details
(Keywords: memory-leak)
Attachments
(1 file)
587 bytes,
patch
|
mitesh
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
Trunk CVS pull, 8 pm 10-3-2001, Windows 2000.
Using the autocomplete setup provided by hong@netscape.com.
dmose had asked a long time ago if I could run this, sorry it took so long.
Steps to Reproduce:
1. Mozilla.exe -compose.
2. Type dmos (it'll complete to Dan Mosedale <dmose@netscape.com>).
3. Tab to subject.
4. Exit.
[W] MLK: Memory leak of 132 bytes from 1 block allocated in PR_Calloc
Distribution of leaked blocks
Allocation location
calloc+0xc [C:\WINNT\SYSTEM32\msvcrt.DLL ip=0x5800122b]
PR_Calloc+0x31 [.\../../../../pr/src/malloc/prmem.c:59 ip=0x30018cb1]
nsLDAPConnectionLoop::Init(void)+0x33
[c:\moz_src\mozilla\directory\xpcom\base\src\nsLDAPConnection.cpp:573
ip=0x0df48020]
nsLDAPConnectionLoop::Init()
{
if (!mLock) {
=> mLock = PR_NewLock();
if (!mLock) {
NS_ERROR("nsLDAPConnectionLoop::Init: out of memory ");
return NS_ERROR_OUT_OF_MEMORY;
nsLDAPConnection::OnStopLookup(nsISupports *,char const*,UINT)+0x244
[c:\moz_src\mozilla\directory\xpcom\base\src\nsLDAPConnection.cpp:973
ip=0x0df49456]
//
mRunnable = new nsLDAPConnectionLoop();
NS_ADDREF(mRunnable);
=> rv = mRunnable->Init();
if (NS_FAILED(rv)) {
rv = NS_ERROR_OUT_OF_MEMORY;
} else {
XPTC_InvokeByIndex+0x75
[c:\moz_src\mozilla\xpcom\reflect\xptcall\src\md\win32\xptcinvoke.cpp:152
ip=0x100d4c0e]
mov eax,methodIndex
shl eax,2 // *= 4
add edx,eax
=> call [edx] // stdcall, i.e. callee cleans up
stack.
}
}
#pragma warning(default : 4035) // restore default
EventHandler+0xb4
[c:\moz_src\mozilla\xpcom\proxy\src\nsProxyEvent.cpp:514 ip=0x100e4fb7]
nsresult rv = XPTC_InvokeByIndex( proxyObject->GetRealObject(),
info->GetMethodIndex(),
info->GetParameterCount(),
=> info->GetParameterList());
info->SetResult(rv);
}
else
md_EventReceiverProc+0x61 [c:\moz_src\mozilla\xpcom\threads\plevent.c:1071
ip=0x100cdd6f]
{
PREventQueue *queue = (PREventQueue *)lParam;
queue->removeMsg = PR_FALSE;
=> PL_ProcessPendingEvents(queue);
queue->removeMsg = PR_TRUE;
#ifdef XP_OS2
return MRFROMLONG(TRUE);
ScrollDC+0x490 [C:\WINNT\SYSTEM32\user32.dll ip=0x77e12e98]
ScrollDC+0x6d8 [C:\WINNT\SYSTEM32\user32.dll ip=0x77e130e0]
DispatchMessageA+0xb [C:\WINNT\SYSTEM32\user32.dll ip=0x77e15824]
Comment 1•23 years ago
|
||
maybe
Lines 561 -> 565
// destructor
//
nsLDAPConnectionLoop::~nsLDAPConnectionLoop()
{
}
should be replaced by
// destructor
//
nsLDAPConnectionLoop::~nsLDAPConnectionLoop()
{
if (mLock) {
PR_DestroyLock(mLock);
}
}
??
Jerome
Assignee | ||
Comment 3•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.0
Assignee | ||
Comment 4•23 years ago
|
||
Mitesh - Can you review this please?
Comment 5•23 years ago
|
||
Comment on attachment 53651 [details] [diff] [review]
Memory leak fix
looks good. r=mitesh
Attachment #53651 -
Flags: review+
Comment 6•23 years ago
|
||
Comment on attachment 53651 [details] [diff] [review]
Memory leak fix
sr=bienvenu
Attachment #53651 -
Flags: superreview+
Reporter | ||
Comment 7•23 years ago
|
||
QA-->Myself. I'm set up to verify this using Purify.
QA Contact: yulian → stephend
Assignee | ||
Comment 8•23 years ago
|
||
Checked in on trunk.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 9•23 years ago
|
||
Verified FIXED.
I've filed 2 bugs, bug 106857 and bug 106858 for new leaks.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•