Closed andrei-aciobanitei closed 4 years ago
Closing but let me know if I missed something. Thanks for getting in touch
It's not freed all the time, only when the CGI state was restored from a file, in which case it is allocated from the heap, not static.
On Fri, Aug 7, 2020 at 9:02 AM mcssm notifications@github.com wrote:
Hello,
Is there a specific reason why free(cgiContentType) is called for a statically allocated variable?
char cgiContentTypeData[1024]; char *cgiContentType = cgiContentTypeData;
Thank you.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/boutell/cgic/issues/15, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAH27OTDKZRD376U6XT2Q3R7P3PVANCNFSM4PXTPCSA .
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER APOSTROPHECMS | apostrophecms.com | he/him/his
Thank you for your quick reply. Yes, indeed, it is freed only when allocated from the heap (when cgiRestored is set to 1).
Hello,
Is there a specific reason why
free(cgiContentType)
is called for a statically allocated variable?Thank you.