Closed Bug 400360 Opened 17 years ago Closed 17 years ago

nsLDAPAutoCompleteSession leaks nsILDAPConnection

Categories

(MailNews Core :: LDAP Integration, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: simon, Assigned: simon)

Details

(Keywords: memory-leak, regression)

Attachments

(1 file)

nsLDAPAutoCompleteSession has a non-nsCOMptr, manually reference counted, copy of the current LDAP connection held in mConnection. This is manually reference counted in, and released when the connection becomes UNBOUND. However, if the nsLDAPAutoCompleteSession object goes out of scope without the connection being unbound, the connection is leaked. This leads to Thunderbird hanging on exit.
Fix the leak, by RELEASEing the connection in the destructor.
Assignee: nobody → simon
Status: NEW → ASSIGNED
Attachment #285457 - Flags: review?(bugzilla)
FWIW this was a regression caused by my patch on bug 398059.
Keywords: regression
Comment on attachment 285457 [details] [diff] [review]
Release connection when object is destroyed

Yep, that's much better. Thanks for finding this.
Attachment #285457 - Flags: review?(bugzilla) → review+
Attachment #285457 - Flags: superreview?(bienvenu)
Comment on attachment 285457 [details] [diff] [review]
Release connection when object is destroyed

thx, Simon.
Attachment #285457 - Flags: superreview?(bienvenu) → superreview+
Checked in:

/cvsroot/mozilla/mailnews/addrbook/src/nsLDAPAutoCompleteSession.cpp,v  <--  nsLDAPAutoCompleteSession.cpp
new revision: 1.52; previous revision: 1.51

Thanks Simon.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Keywords: mlk
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: