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 jobs mode with -de (si...



details:   https://anonhg.NetBSD.org/src/rev/1a6a122a35c2
branches:  trunk
changeset: 1026554:1a6a122a35c2
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Nov 28 17:20:39 2021 +0000

description:
make: fix memory leak in jobs mode with -de (since today)

diffstat:

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

diffs (26 lines):

diff -r 00d5098c962d -r 1a6a122a35c2 usr.bin/make/job.c
--- a/usr.bin/make/job.c        Sun Nov 28 16:31:39 2021 +0000
+++ b/usr.bin/make/job.c        Sun Nov 28 17:20:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: job.c,v 1.437 2021/11/28 00:02:07 rillig Exp $ */
+/*     $NetBSD: job.c,v 1.438 2021/11/28 17:20:39 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -142,7 +142,7 @@
 #include "trace.h"
 
 /*     "@(#)job.c      8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.437 2021/11/28 00:02:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.438 2021/11/28 17:20:39 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -1080,6 +1080,7 @@
                        (void)Var_Subst((const char *)ln->datum, job->node,
                            VARE_WANTRES, &expanded);
                        debug_printf("\t=> %s\n", expanded);
+                       free(expanded);
                }
        }
 }



Home | Main Index | Thread Index | Old Index