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: fix remaining memory leak for .SUFFIXES (...



details:   https://anonhg.NetBSD.org/src/rev/6f853e8d5015
branches:  trunk
changeset: 1027609:6f853e8d5015
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Dec 13 02:22:14 2021 +0000

description:
make: fix remaining memory leak for .SUFFIXES (since yesterday)

diffstat:

 usr.bin/make/var.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 1d961a63b85a -r 6f853e8d5015 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Mon Dec 13 02:17:59 2021 +0000
+++ b/usr.bin/make/var.c        Mon Dec 13 02:22:14 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.978 2021/12/13 02:17:59 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.979 2021/12/13 02:22:14 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.978 2021/12/13 02:17:59 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.979 2021/12/13 02:22:14 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -4417,8 +4417,7 @@
        if (v == NULL && Substring_Equals(name, ".SUFFIXES")) {
                char *suffixes = Suff_NamesStr();
                v = VarNew(FStr_InitRefer(".SUFFIXES"), suffixes,
-                   /* TODO: change to true to fix memory leak */
-                   false, false, true);
+                   true, false, true);
                free(suffixes);
        } else if (v == NULL)
                v = FindLocalLegacyVar(name, scope, out_true_extraModifiers);



Home | Main Index | Thread Index | Old Index