free CRASHREPORT option data

Plug a straightforward memory leak.
This commit is contained in:
PatR
2025-04-17 17:00:39 -07:00
parent 07b59e783e
commit 7c40819202
2 changed files with 16 additions and 8 deletions

View File

@@ -143,6 +143,13 @@ sysopt_release(void)
if (sysopt.greppath)
free((genericptr_t) sysopt.greppath), sysopt.greppath = (char *) 0;
#ifdef CRASHREPORT
if (gc.crash_email)
free((genericptr_t) gc.crash_email), gc.crash_email = (char *) NULL;
if (gc.crash_name)
free((genericptr_t) gc.crash_name), gc.crash_name = (char *) NULL;
#endif
/* this one's last because it might be used in panic feedback, although
none of the preceding ones are likely to trigger a controlled panic */
if (sysopt.fmtd_wizard_list)