Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make Plug memory leak in JobPrintCommand.



details:   https://anonhg.NetBSD.org/src/rev/1ce4bd99b6fd
branches:  trunk
changeset: 823239:1ce4bd99b6fd
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Apr 16 21:23:43 2017 +0000

description:
Plug memory leak in JobPrintCommand.

CID 978366

diffstat:

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

diffs (34 lines):

diff -r d9fbf032a36d -r 1ce4bd99b6fd usr.bin/make/job.c
--- a/usr.bin/make/job.c        Sun Apr 16 21:14:47 2017 +0000
+++ b/usr.bin/make/job.c        Sun Apr 16 21:23:43 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: job.c,v 1.189 2017/04/16 20:57:14 riastradh Exp $      */
+/*     $NetBSD: job.c,v 1.190 2017/04/16 21:23:43 riastradh Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.189 2017/04/16 20:57:14 riastradh Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.190 2017/04/16 21:23:43 riastradh Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)job.c      8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: job.c,v 1.189 2017/04/16 20:57:14 riastradh Exp $");
+__RCSID("$NetBSD: job.c,v 1.190 2017/04/16 21:23:43 riastradh Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -744,6 +744,7 @@
                 * but this one needs to be - use compat mode just for it.
                 */
                CompatRunCommand(cmdp, job->node);
+               free(cmdStart);
                return 0;
            }
            break;



Home | Main Index | Thread Index | Old Index