Closed Bug 93949 Opened 23 years ago Closed 23 years ago

memory leak of versionEntry in pcertdb.c

Categories

(NSS :: Libraries, defect, P2)

x86
Windows 2000
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jeff, Assigned: rrelyea)

References

Details

(Keywords: memory-leak, perf)

in mozilla/security/nss/lib/certdb/pcertdb.c::SEC_OpenPermCertDB() the variable versionEntry is not deleted under normal circumstances. consider adding the part marked #if 1 below: /* check for correct version number */ if ( handle->permCertDB ) { versionEntry = ReadDBVersionEntry(handle); if ( versionEntry == NULL ) { /* no version number */ certdb_Close(handle->permCertDB); handle->permCertDB = 0; } else if ( versionEntry->common.version != CERT_DB_FILE_VERSION ) { /* wrong version number, can't update in place */ DestroyDBEntry((certDBEntry *)versionEntry); PORT_Free(certdbname); return(SECFailure); } #if 1//begin JLH added else { DestroyDBEntry((certDBEntry *)versionEntry); versionEntry = NULL; } #endif//end JLH added }
Assigned the bug to Bob.
Assignee: wtc → relyea
Marking NEW..thanks again.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: mlk, patch, perf, review
Priority: -- → P2
Target Milestone: --- → 3.4
Fixed in NSS 3.4
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.