Module Name: src Committed By: rillig Date: Mon Dec 13 00:09:07 UTC 2021
Modified Files: src/usr.bin/make: parse.c Log Message: make: fix memory leak in IncludeFile Previously, each .include leaked a copy of the file name. To generate a diff of this commit: cvs rdiff -u -r1.574 -r1.575 src/usr.bin/make/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.574 src/usr.bin/make/parse.c:1.575 --- src/usr.bin/make/parse.c:1.574 Sun Dec 12 15:44:41 2021 +++ src/usr.bin/make/parse.c Mon Dec 13 00:09:07 2021 @@ -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 @@ IncludeFile(const char *file, bool isSys CurFile()->lf = lf; if (depinc) doing_depend = depinc; /* only turn it on */ - /* TODO: consider free(fullname); */ + free(fullname); } /*