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: clean up FStr and MFStr memory in cleanup...
details: https://anonhg.NetBSD.org/src/rev/8fc622c7d5ad
branches: trunk
changeset: 952691:8fc622c7d5ad
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Feb 14 21:32:58 2021 +0000
description:
make: clean up FStr and MFStr memory in cleanup mode
diffstat:
usr.bin/make/nonints.h | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (31 lines):
diff -r d69f53d29c0d -r 8fc622c7d5ad usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h Sun Feb 14 20:58:34 2021 +0000
+++ b/usr.bin/make/nonints.h Sun Feb 14 21:32:58 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nonints.h,v 1.202 2021/02/05 05:15:12 rillig Exp $ */
+/* $NetBSD: nonints.h,v 1.203 2021/02/14 21:32:58 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -204,6 +204,10 @@
FStr_Done(FStr *fstr)
{
free(fstr->freeIt);
+#ifdef CLEANUP
+ fstr->str = NULL;
+ fstr->freeIt = NULL;
+#endif
}
/* Return a string that is the sole owner of str. */
@@ -224,6 +228,10 @@
MFStr_Done(MFStr *mfstr)
{
free(mfstr->freeIt);
+#ifdef CLEANUP
+ mfstr->str = NULL;
+ mfstr->freeIt = NULL;
+#endif
}
Words Str_Words(const char *, Boolean);
Home |
Main Index |
Thread Index |
Old Index