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 when parsing ':from=to' m...



details:   https://anonhg.NetBSD.org/src/rev/f5d0dfc5235f
branches:  trunk
changeset: 373865:f5d0dfc5235f
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Mar 09 06:49:37 2023 +0000

description:
make: fix memory leak when parsing ':from=to' modifiers

Since var.c 1.925 from 2021-04-12.

diffstat:

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

diffs (26 lines):

diff -r 6da132fde94a -r f5d0dfc5235f usr.bin/make/var.c
--- a/usr.bin/make/var.c        Tue Mar 07 21:24:19 2023 +0000
+++ b/usr.bin/make/var.c        Thu Mar 09 06:49:37 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.1047 2023/02/18 11:16:09 rillig Exp $        */
+/*     $NetBSD: var.c,v 1.1048 2023/03/09 06:49:37 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1047 2023/02/18 11:16:09 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1048 2023/03/09 06:49:37 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -3668,6 +3668,7 @@
 
 done:
        LazyBuf_Done(&lhsBuf);
+       FStr_Done(&rhs);
        return AMR_OK;
 }
 #endif



Home | Main Index | Thread Index | Old Index