Skip to content

memory leak in TCustomHTTPModule (fphttp.pp)

Summary

TCustomHTTPModule creates FCORS but doesn't destroy it since it doesn't implement a destructor.

System Information

I'm using fpc 3.2.2 but I see that there's no destructor in trunk either

Steps to reproduce

Create a project using fpwebfile to serve files, enable heaptrc, request some files, check the memory leak

Possible fixes

Attached a patch that implements the destructor fixing the memory leak.fphttpmemleak.diff

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information