Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make: free the names of the makefiles in cleanu...
details: https://anonhg.NetBSD.org/src/rev/cf83862bf44b
branches: trunk
changeset: 1029221:cf83862bf44b
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Dec 27 23:11:55 2021 +0000
description:
make: free the names of the makefiles in cleanup mode
Since parse.c 1.576 from 2021-12-13 the filenames from opts.makefiles no
longer end up in the GNodes, they are copied by Str_Intern.
diffstat:
usr.bin/make/main.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diffs (43 lines):
diff -r 909db87b5539 -r cf83862bf44b usr.bin/make/main.c
--- a/usr.bin/make/main.c Mon Dec 27 23:06:19 2021 +0000
+++ b/usr.bin/make/main.c Mon Dec 27 23:11:55 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.556 2021/12/27 23:06:19 rillig Exp $ */
+/* $NetBSD: main.c,v 1.557 2021/12/27 23:11:55 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.556 2021/12/27 23:06:19 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.557 2021/12/27 23:11:55 rillig Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@@ -1218,14 +1218,7 @@
Fatal("%s: cannot open %s.",
progname, (const char *)sysMkFiles.first->datum);
- /*
- * Free the list nodes but not the actual filenames since these may
- * still be used in GNodes.
- *
- * TODO: Check whether the above is still true after Str_Intern has
- * been added.
- */
- Lst_Done(&sysMkFiles);
+ Lst_DoneCall(&sysMkFiles, free);
}
static void
@@ -1605,7 +1598,7 @@
{
#ifdef CLEANUP
Lst_DoneCall(&opts.variables, free);
- Lst_Done(&opts.makefiles);
+ Lst_DoneCall(&opts.makefiles, free);
Lst_DoneCall(&opts.create, free);
#endif
Home |
Main Index |
Thread Index |
Old Index