mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
mamake: fix memory leak
This now allows our little make utility to run when compiled with AddressSanitizer on gcc on Linux; it no longer aborts the build on exit with a complaint about (very small) memory leaks.
This commit is contained in:
parent
b991987642
commit
a2c24282a7
1 changed files with 7 additions and 2 deletions
|
@ -27,7 +27,7 @@
|
|||
* coded for portability
|
||||
*/
|
||||
|
||||
#define RELEASE_DATE "2022-06-12"
|
||||
#define RELEASE_DATE "2022-07-15"
|
||||
static char id[] = "\n@(#)$Id: mamake (ksh 93u+m) " RELEASE_DATE " $\0\n";
|
||||
|
||||
#if _PACKAGE_ast
|
||||
|
@ -2127,7 +2127,12 @@ recurse(char* pattern)
|
|||
*/
|
||||
|
||||
walk(state.rules, scan, NiL);
|
||||
state.view = 0;
|
||||
while (state.view)
|
||||
{
|
||||
View_t *prev = state.view;
|
||||
state.view = state.view->next;
|
||||
free(prev);
|
||||
}
|
||||
walk(state.rules, descend, NiL);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue