Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make CID 1025007: Don't leak missingFiles



details:   https://anonhg.NetBSD.org/src/rev/43f88046cd27
branches:  trunk
changeset: 813941:43f88046cd27
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 27 16:17:26 2016 +0000

description:
CID 1025007: Don't leak missingFiles

diffstat:

 usr.bin/make/meta.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 97093f2c6819 -r 43f88046cd27 usr.bin/make/meta.c
--- a/usr.bin/make/meta.c       Sat Feb 27 16:14:23 2016 +0000
+++ b/usr.bin/make/meta.c       Sat Feb 27 16:17:26 2016 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: meta.c,v 1.49 2016/02/27 16:14:23 christos Exp $ */
+/*      $NetBSD: meta.c,v 1.50 2016/02/27 16:17:26 christos Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -1368,7 +1368,6 @@
                fprintf(debug_file, "%s: missing files: %s...\n",
                        fname, (char *)Lst_Datum(Lst_First(missingFiles)));
            oodate = TRUE;
-           Lst_Destroy(missingFiles, (FreeProc *)free);
        }
     } else {
        if ((gn->type & OP_META)) {
@@ -1377,6 +1376,9 @@
            oodate = TRUE;
        }
     }
+
+    Lst_Destroy(missingFiles, (FreeProc *)free);
+
     if (oodate && needOODATE) {
        /*
         * Target uses .OODATE which is empty; or we wouldn't be here.



Home | Main Index | Thread Index | Old Index