Closed Bug 341118 Opened 19 years ago Closed 19 years ago

Coverity 544 sec_pkcs12_decoder_verify_mac leaks allocated SECItem

Categories

(NSS :: Libraries, defect, P2)

3.11.1
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.11.3

People

(Reporter: nelson, Assigned: neil.williams)

References

Details

(Keywords: coverity, memory-leak, Whiteboard: CID 544)

Coverity CID 544 sec_pkcs12_decoder_verify_mac() calls 1317 SECItem * params = NULL; 1348 params = PK11_CreatePBEParams(&p12dcx->macData.macSalt, p12dcx->pwitem, 1349 iteration); which allocates a new SECItem, and a new params struct (to which the SECItem points). Then it calls 1439 if (params) { 1440 PK11_DestroyPBEParams(params); 1441 } But surprisingly (!) PK11_DestroyPBEParams doesn't destroy (free) the SECItem so the SECItem is leaked. I think the right fix is to change PK11_DestroyPBEParams to destroy its argument. Bug 341117 calls for that. But if that change isn't made, then we need to stop the leak here.
Priority: -- → P2
Whiteboard: CID 544
Marking as RESOLVED FIXED as the Bug 341117 should have fixed this.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.