...
It might be better to replace the pointer pst
with an auto_ptr
which automatically cleans up itself.
...
Priority: P2 Level: L3
Memory and other resource leaks will eventually cause a program to crash. If an attacker can provoke repeated resource leaks by forcing an exception to be thrown through the submission of suitably crafted data, then the attacker can mount a denial-of-service attack.
Component | Value |
---|---|
Severity | 1 (low) |
Likelihood | 2 (probable) |
Remediation cost | 1 (high) |
References
- Meyers 06 Item 9: "Use destructors to prevent resource leaks".