LL045
Double free
Object Pascal — Delphi & Free Pascal
Error
Reliability
Freeing the same object twice causes access violations or heap corruption
freeing the same object twice causes access violations or heap corruption.
Why this severity
freeing the same object twice causes access violations or heap corruption.
Known false positives
conditional branches where only one path frees the object.
Remediation example
FreeAndNil(FStream); // FStream is now nil; a second FreeAndNil is safe but unnecessary