mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00

Caused by #5650 I actually don't understand how this didn't happen before or why we didn't notice it but it seems like the envmap was never freed. In the latest debug builds prior to this build GPA reports the leak. We should free the envmap when the subprocess is deinitialized. But also we can free the env map as soon as we start the subprocess which saves some small amount of memory at runtime. Additionally, we should only be freeing the envmap on error if we created it.