Module Name: src
Committed By: rillig
Date: Wed Dec 23 13:11:27 UTC 2020
Modified Files:
src/usr.bin/make: var.c
Log Message:
make(1): fix memory leak in Var_Undef (since 2020-12-22)
To generate a diff of this commit:
cvs rdiff -u -r1.762 -r1.763 src/usr.bin/make/var.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/var.c
diff -u src/usr.bin/make/var.c:1.762 src/usr.bin/make/var.c:1.763
--- src/usr.bin/make/var.c:1.762 Tue Dec 22 20:10:21 2020
+++ src/usr.bin/make/var.c Wed Dec 23 13:11:27 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.762 2020/12/22 20:10:21 rillig Exp $ */
+/* $NetBSD: var.c,v 1.763 2020/12/23 13:11:27 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.762 2020/12/22 20:10:21 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.763 2020/12/23 13:11:27 rillig Exp $");
typedef enum VarFlags {
VAR_NONE = 0,
@@ -547,6 +547,7 @@ Var_Undef(const char *arg)
}
Words_Free(varnames);
+ free(expanded);
}
static Boolean