Closed
Bug 336198
Opened 19 years ago
Closed 19 years ago
Leak in NSResOpenTable & NSResCreateTable (dbm/src/nsres.c)
Categories
(NSS :: Libraries, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
3.11.2
People
(Reporter: kherron+mozilla, Assigned: nelson)
References
()
Details
(Keywords: coverity, Whiteboard: [CIDs 30 66 67])
Attachments
(1 file, 1 obsolete file)
|
1.08 KB,
patch
|
wtc
:
review+
|
Details | Diff | Splinter Review |
Please refer to the sample URL. In function |NSResCreateTable| at line 82, a block of memory is allocated into |hres|. At lines 100-101, if the |dbopen| operation fails, the function returns without freeing this memory.
An identical pattern appears in |NSResOpenTable| beginning at line 113.
| Reporter | ||
Updated•19 years ago
|
Whiteboard: [good first bug]
Comment 1•19 years ago
|
||
Assignee: nobody → rflint
Status: NEW → ASSIGNED
Attachment #220682 -
Flags: superreview?(rrelyea)
Attachment #220682 -
Flags: review?(wtchang)
Comment 2•19 years ago
|
||
I believe mozilla/dbm/src/nsres.c is dead code
because I verified that all the functions defined in
nsres.c are declared in nsres.h, and no files in the
Mozilla source tree include nsres.h:
http://lxr.mozilla.org/seamonkey/search?string=nsres.h
http://lxr.mozilla.org/mozilla1.8/search?string=nsres.h
http://lxr.mozilla.org/mozilla1.8.0/search?string=nsres.h
http://lxr.mozilla.org/mozilla1.7/search?string=nsres.h
http://lxr.mozilla.org/aviary101branch/search?string=nsres.h
So I suggest that we cvs remove nsres.c and nsres.h.
Severity: minor → trivial
| Assignee | ||
Comment 3•19 years ago
|
||
> So I suggest that we cvs remove nsres.c and nsres.h.
I second that motion.
| Assignee | ||
Updated•19 years ago
|
Target Milestone: --- → 3.11.2
Version: unspecified → 3.11
| Assignee | ||
Comment 4•19 years ago
|
||
Ryan, would you like to verify that your tree still builds completely with
nsres.[ch] removed from it?
Priority: -- → P2
| Assignee | ||
Comment 5•19 years ago
|
||
Attachment #220682 -
Attachment is obsolete: true
Attachment #221665 -
Flags: review?(wtchang)
Attachment #220682 -
Flags: superreview?(rrelyea)
Attachment #220682 -
Flags: review?(wtchang)
| Assignee | ||
Comment 6•19 years ago
|
||
Christophe:
Please look and see if the removal of these two source files, including one
formerly public header file, will cause any angst. Advise us on what you find.
Whiteboard: [good first bug]
Updated•19 years ago
|
Attachment #221665 -
Flags: review?(wtchang) → review+
Comment 7•19 years ago
|
||
We don't deliver nsres.h so we can remove it without any impact on our delivery.
| Assignee | ||
Comment 8•19 years ago
|
||
committed on branch.
Checking in include/manifest.mn; new revision: 1.2.20.1; previous revision: 1.2
Checking in src/manifest.mn; new revision: 1.4.16.1; previous revision: 1.4
Assignee: rflint → nelson
Status: ASSIGNED → NEW
| Assignee | ||
Comment 9•19 years ago
|
||
Checked in on trunk
include/manifest.mn; new revision: 1.3; previous revision: 1.2
src/manifest.mn; new revision: 1.5; previous revision: 1.4
Status: NEW → ASSIGNED
| Assignee | ||
Comment 10•19 years ago
|
||
Files CVS removed from trunk
Removing include/nsres.h; new revision: delete; previous revision: 3.2
Removing src/nsres.c; new revision: delete; previous revision: 3.6
| Assignee | ||
Comment 11•19 years ago
|
||
Files removed from NSS_3_11_BRANCH
Removing include/nsres.h; new revision: delete; previous revision: 3.2
Removing src/nsres.c; new revision: delete; previous revision: 3.6
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 12•19 years ago
|
||
CIDs 30 66 67
| Assignee | ||
Updated•19 years ago
|
Whiteboard: [CIDs 30 66 67]
You need to log in
before you can comment on or make changes to this bug.
Description
•