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 memory leak in IncludeFile



details:   https://anonhg.NetBSD.org/src/rev/c147c17a9c0d
branches:  trunk
changeset: 1027600:c147c17a9c0d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Dec 13 00:09:07 2021 +0000

description:
make: fix memory leak in IncludeFile

Previously, each .include leaked a copy of the file name.

diffstat:

 usr.bin/make/parse.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 5d2cafc84352 -r c147c17a9c0d usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sun Dec 12 23:47:21 2021 +0000
+++ b/usr.bin/make/parse.c      Mon Dec 13 00:09:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.574 2021/12/12 15:44:41 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.575 2021/12/13 00:09:07 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.574 2021/12/12 15:44:41 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.575 2021/12/13 00:09:07 rillig Exp $");
 
 /* types and constants */
 
@@ -2226,7 +2226,7 @@
        CurFile()->lf = lf;
        if (depinc)
                doing_depend = depinc;  /* only turn it on */
-       /* TODO: consider free(fullname); */
+       free(fullname);
 }
 
 /*



Home | Main Index | Thread Index | Old Index